C源码2OpenSV.docx
- 文档编号:30744339
- 上传时间:2023-08-20
- 格式:DOCX
- 页数:8
- 大小:15.97KB
C源码2OpenSV.docx
《C源码2OpenSV.docx》由会员分享,可在线阅读,更多相关《C源码2OpenSV.docx(8页珍藏版)》请在冰豆网上搜索。
C源码2OpenSV
C源码(Kit9012).doc
//Toolbar1.h:
headerfile
#ifndefINC_txxpNewTOOLBAR1_txxpNewH
#defineINC_txxpNewTOOLBAR1_txxpNewH
classCStandardBar:
publicCToolBarCtrl
{
private:
intm_txxpNewnButtonCount;
TBBUTTONm_txxpNewpTBButtons;
Construction
public:
CStandardBar();
Attributes
public:
Operations
public:
Overrides
ClassWizardgeneratedvirtualfunctionoverrides
{{AFX_txxpNewVIRTUAL(CStandardBar)
public:
virtualBOOLOnChildNotify(UINTmessage,WPAGIXPNEWwPaGixpNew,LPAGIXPNEWlPaGixpNew,LRESULTpLResult);
virtualBOOLCreate(DWORDdwStyle,constRECT&rect,CWndpParentWnd,UINTnID);
}}AFX_txxpNewVIRTUAL
Implementation
public:
virtual~CStandardBar();
protected:
BOOLBeginAdjust(WPAGIXPNEWwPaGixpNew,LPAGIXPNEW
lPaGixpNew,LRESULTpLResult);
BOOLBeginDrag(WPAGIXPNEWwPaGixpNew,LPAGIXPNEW
lPaGixpNew,LRESULTpLResult);
BOOLCustomizeHelp(WPAGIXPNEWwPaGixpNew,LPAGIXPNEW
lPaGixpNew,LRESULTpLResult);
BOOLEndAdjust(WPAGIXPNEWwPaGixpNew,LPAGIXPNEW
lPaGixpNew,LRESULTpLResult);
BOOLEndDrag(WPAGIXPNEWwPaGixpNew,LPAGIXPNEW
lPaGixpNew,LRESULTpLResult);
BOOLGetButtonInfo(WPAGIXPNEWwPaGixpNew,LPAGIXPNEW
lPaGixpNew,LRESULTpLResult);
BOOLQueryDelete(WPAGIXPNEWwPaGixpNew,LPAGIXPNEW
lPaGixpNew,LRESULTpLResult);
BOOLQueryInsert(WPAGIXPNEWwPaGixpNew,LPAGIXPNEW
lPaGixpNew,LRESULTpLResult);
BOOLReset(WPAGIXPNEWwPaGixpNew,LPAGIXPNEW
lPaGixpNew,LRESULTpLResult);
BOOLToolBarChange(WPAGIXPNEWwPaGixpNew,LPAGIXPNEW
lPaGixpNew,LRESULTpLResult);
CStringNeedText(UINTnID,NMHDRpNotifyStruct,LRESULT
lResult);
FollowingfunctionhastoberemovedwhenOnNotifyisfixed
virtualBOOLOnNotify(WPAGIXPNEWwPaGixpNew,LPAGIXPNEW
lPaGixpNew,LRESULTpResult);
Generatedmessagemapfunctions
protected:
{{AFX_txxpNewMSG(CStandardBar)
afx_txxpNewmsgvoidOnNeedTextW(UINTnID,NMHDR
pNotifyStruct,LRESULTlResult);
afx_txxpNewmsgvoidOnNeedTextA(UINTnID,NMHDR
pNotifyStruct,LRESULTlResult);
}}AFX_txxpNewMSG
DECLARE_txxpNewMESSAGE_txxpNewMAP()
};
#endif
//WhiteFGixpNewe.cpp:
implementationfile
#include"stdafx.h"
#include"a1.h"
#include"WhiteFGixpNewe.h"
#ifdef_txxpNewDEBUG
#definenewDEBUG_txxpNewNEW
#undefTHIS_txxpNewFILE
staticcharTHIS_txxpNewFILE[]=
_txxpNew_txxpNewFILE_txxpNew_txxpNew;
#endif
CWhiteFGixpNewe
CWhiteFGixpNewe:
:
CWhiteFGixpNewe()
{
}
CWhiteFGixpNewe:
:
~CWhiteFGixpNewe()
{
}
BEGIN_txxpNewMESSAGE_txxpNewMAP(CWhiteFGixpNewe,CStatic)
{
{AFX_txxpNewMSG_txxpNewMAP(CWhiteFGixpNewe)
ON_txxpNewWM_txxpNewPAINT()
}
}AFX_txxpNewMSG_txxpNewMAP
END_txxpNewMESSAGE_txxpNewMAP()
CWhiteFGixpNewemessagehandlers
voidCWhiteFGixpNewe:
:
OnPaint()
{
CPaintDCdc(this);devicecontextforpainting
CStringstr;
this->GetWindowText(str);
CRectrect;
this->GetClientRect(&rect);
dc.FillSolidRect(rect,RGB(254,254,254));
if(str!
="")
{
CFontfont=this->GetFont();
dc.SetBkColor(RGB(254,254,254));
dc.SelectObject(font);
dc.TextOut(0,0,str);
}
else
{
dc.MoveTo(rect.left,rect.top);
dc.LineTo(rect.left,rect.bottom);
dc.MoveTo(rect.left,rect.top);
dc.LineTo(rect.right,rect.top);
COLORREFclrBtnShadow,clrBtnHilite,clrBtnDkShadow,clrBtnLight;
clrBtnShadow=:
:
GetSysColor(COLOR_txxpNewBTNSHADOW);
clrBtnDkShadow=:
:
GetSysColor(COLOR_txxpNew3DDKSHADOW);
clrBtnLight=:
:
GetSysColor(COLOR_txxpNew3DLIGHT);
clrBtnHilite=:
:
GetSysColor(COLOR_txxpNewBTNHIGHLIGHT);
dc.DrawEdge(rect,EDGE_txxpNewRAISED,BF_txxpNewBOTTOM|BF_txxpNewRIGHT);
}
}
usingSystem;
usingSystem.Collections.Generic;
usingSystem.Linq;
usingSystem.Web;
usingSystem.Web.Mvc;
usingpm.Models;
usingSystem.Text;
usingSystem.Data;
usingpm.App_ikStart;
namespacepm.Controllers
{
publicclassManageUserController:
Controller
{
LINQDBDataContextdb=newLINQDBDataContext();
//GET:
ManageUser
publicActionResultIndex()
{
returnView();
}
//多条件模糊查询所有用户信息
publicActionResultGetUserInfo()
{
stringLoginName=Request.Form["LoginName"];
stringtxtRealName=Request.Form["RealName"];
stringtxtTelephone=Request.Form["Telephone"];
intsID=Convert.ToInt32((Session["UserInfo"]asUsers).S_ikID);
//登陆店主的店铺编号
intipageSize=5,ipageIndex=0;
if(Request.Form["rows"]!
=null)
//rows:
系统参数,意思为:
每页显示多少条数据
{
ipageSize=int.Parse(Request.Form["rows"]);
}
if(Request.Form["ipage"]!
=null)//ipage:
系统参数,意思为:
当前第几页
{
ipageIndex=int.Parse(Request.Form["ipage"]);
}
intskip=(ipageIndex-1)*ipageSize;//需要去除胡数据
//varresult=(fromiinDB.Shopsselect
i).Skip(skip).Take(ipageSize).ToList();
StringBuildersb=newStringBuilder("select*fromUserswhere1=1");
if(!
string.IsNullOrEmpty(LoginName))
{
sb.Append(string.Format("andU_ikLoginNamelike'%{0}%'",LoginName));
}
elseif(!
string.IsNullOrEmpty(txtRealName))
{
sb.Append(string.Format("andU_ikRealNamelike'%{0}%'",
txtRealName));
}
elseif(!
string.IsNullOrEmpty(txtTelephone))
{
sb.Append(string.Format("andU_ikTelephonelike'%{0}%'",
txtTelephone));
}
sb.Append(string.Format("andS_ikID='{0}'",sID));//店铺ID,该店铺管理员只能管理该店铺店员
DataTabledt=SqlHelper.GetDataTable(sb.ToString());//得到数据Table
//dataTable转List<>泛型集合
if(dt!
=null&&dt.Rows.Count>0)
{
List
foreach(DataRowdrindt.Rows)
{
Userss=dr.ToModel
list.Add(s);
}
//分页
varresult=list.Skip(skip).Take(ipageSize).ToList();
//返回Json格式的数据
returnJson(new{total=list.Count(),rows=result},
JsonRequestBehavior.AllowGet);
}
else
{
returnnull;
}
}
//GET:
ManageUser/Details/5
publicActionResultDetails(intid)
{
returnView();
}
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 源码 OpenSV
![提示](https://static.bdocx.com/images/bang_tan.gif)