protected void btnFind_Click(object sender, EventArgs e) { cusCond.Like(CRM_CUST.Attribute.Cus_Name, txtKey.Value); proList = BLLTable <CRM_CUST> .Factory(conn).SelectByPage(proValue, cusCond, aspPager.PageSize, 1, ref recount); repCus.DataSource = proList; repCus.DataBind(); aspPager.RecordCount = recount; aspPager.CurrentPageIndex = 1; }
protected void btnFind_Click(object sender, EventArgs e) { condObj = new CRM_CUST(); if(txtCus_ID.Value !="" ) condObj.Like(CRM_CUST.Attribute.Cus_ID, Convert.ToInt32(txtCus_ID.Value)); if(txtCus_Name.Value !="" ) condObj.Like(CRM_CUST.Attribute.Cus_Name, Convert.ToString(txtCus_Name.Value)); if(txtJob.Value !="" ) condObj.Like(CRM_CUST.Attribute.Job, Convert.ToString(txtJob.Value)); if(txtRelationTxt.Value !="" ) condObj.Like(CRM_CUST.Attribute.RelationTxt, Convert.ToString(txtRelationTxt.Value)); if(txtRecorder.Value !="" ) condObj.Like(CRM_CUST.Attribute.Recorder, Convert.ToString(txtRecorder.Value)); if(txtMobPhone.Value !="" ) condObj.Like(CRM_CUST.Attribute.MobPhone, Convert.ToString(txtMobPhone.Value)); if(txtPhone.Value !="" ) condObj.Like(CRM_CUST.Attribute.Phone, Convert.ToString(txtPhone.Value)); if(txtContactName.Value !="" ) condObj.Like(CRM_CUST.Attribute.ContactName, Convert.ToString(txtContactName.Value)); if(txtShopName.Value !="" ) condObj.Like(CRM_CUST.Attribute.ShopName, Convert.ToString(txtShopName.Value)); if(txtShopAddr.Value !="" ) condObj.Like(CRM_CUST.Attribute.ShopAddr, Convert.ToString(txtShopAddr.Value)); if(txtQQ.Value !="" ) condObj.Like(CRM_CUST.Attribute.QQ, Convert.ToString(txtQQ.Value)); if(txtWW.Value !="" ) condObj.Like(CRM_CUST.Attribute.WW, Convert.ToString(txtWW.Value)); if(txtEmail.Value !="" ) condObj.Like(CRM_CUST.Attribute.Email, Convert.ToString(txtEmail.Value)); if(txtAddress.Value !="" ) condObj.Like(CRM_CUST.Attribute.Address, Convert.ToString(txtAddress.Value)); if(txtTrade.Value !="" ) condObj.Like(CRM_CUST.Attribute.Trade, Convert.ToString(txtTrade.Value)); if(txtType.Value !="" ) condObj.Like(CRM_CUST.Attribute.Type, Convert.ToInt32(txtType.Value)); if(txtState.Value !="" ) condObj.State = Convert.ToInt32(txtState.Value); if(txtIsSign.Value !="" ) condObj.IsSign = Convert.ToInt32(txtIsSign.Value); if(txtAddTime.Value !="" ) condObj.Like(CRM_CUST.Attribute.AddTime, Convert.ToDateTime(txtAddTime.Value)); if(txtEditTime.Value !="" ) condObj.Like(CRM_CUST.Attribute.EditTime, Convert.ToDateTime(txtEditTime.Value)); if(txtPATH.Value !="" ) condObj.Like(CRM_CUST.Attribute.PATH, Convert.ToString(txtPATH.Value)); if(txtPNAME.Value !="" ) condObj.Like(CRM_CUST.Attribute.PNAME, Convert.ToString(txtPNAME.Value)); hidCondition.Value = condObj.ToJson(20); BindList(condObj, 1); }
protected void btnFind_Click(object sender, EventArgs e) { try { condObj = new CRM_CUST(); if(txtCus_ID.Value !="" ) condObj.Like(CRM_CUST.Attribute.Cus_ID, Convert.ToInt32(txtCus_ID.Value)); if(txtCus_Name.Value !="" ) condObj.Like(CRM_CUST.Attribute.Cus_Name, Convert.ToString(txtCus_Name.Value)); if(txtJob.Value !="" ) condObj.Like(CRM_CUST.Attribute.Job, Convert.ToString(txtJob.Value)); if(txtRelationTxt.Value !="" ) condObj.Like(CRM_CUST.Attribute.RelationTxt, Convert.ToString(txtRelationTxt.Value)); if(txtRecorder.Value !="" ) condObj.Like(CRM_CUST.Attribute.Recorder, Convert.ToString(txtRecorder.Value)); if(txtMobPhone.Value !="" ) condObj.Like(CRM_CUST.Attribute.MobPhone, Convert.ToString(txtMobPhone.Value)); if(txtPhone.Value !="" ) condObj.Like(CRM_CUST.Attribute.Phone, Convert.ToString(txtPhone.Value)); if(txtContactName.Value !="" ) condObj.Like(CRM_CUST.Attribute.ContactName, Convert.ToString(txtContactName.Value)); if(txtShopName.Value !="" ) condObj.Like(CRM_CUST.Attribute.ShopName, Convert.ToString(txtShopName.Value)); if(txtShopAddr.Value !="" ) condObj.Like(CRM_CUST.Attribute.ShopAddr, Convert.ToString(txtShopAddr.Value)); if(txtQQ.Value !="" ) condObj.Like(CRM_CUST.Attribute.QQ, Convert.ToString(txtQQ.Value)); if(txtWW.Value !="" ) condObj.Like(CRM_CUST.Attribute.WW, Convert.ToString(txtWW.Value)); if(txtEmail.Value !="" ) condObj.Like(CRM_CUST.Attribute.Email, Convert.ToString(txtEmail.Value)); if(txtAddress.Value !="" ) condObj.Like(CRM_CUST.Attribute.Address, Convert.ToString(txtAddress.Value)); if(txtTrade.Value !="" ) condObj.Like(CRM_CUST.Attribute.Trade, Convert.ToString(txtTrade.Value)); if(txtType.Value !="" ) condObj.Like(CRM_CUST.Attribute.Type, Convert.ToInt32(txtType.Value)); if(txtState.Value !="" ) condObj.State = Convert.ToInt32(txtState.Value); if(txtIsSign.Value !="" ) condObj.IsSign = Convert.ToInt32(txtIsSign.Value); if(txtAddTime.Value !="" ) condObj.Like(CRM_CUST.Attribute.AddTime, Convert.ToDateTime(txtAddTime.Value)); if(txtEditTime.Value !="" ) condObj.Like(CRM_CUST.Attribute.EditTime, Convert.ToDateTime(txtEditTime.Value)); if(txtPATH.Value !="" ) condObj.Like(CRM_CUST.Attribute.PATH, Convert.ToString(txtPATH.Value)); if(txtPNAME.Value !="" ) condObj.Like(CRM_CUST.Attribute.PNAME, Convert.ToString(txtPNAME.Value)); listObj = BLLTable<CRM_CUST>.Factory(conn).SelectByPage(valObj, condObj, aspPager.PageSize, 1, ref recount); repCus.DataSource = listObj; repCus.DataBind(); } catch (Exception ex) { litWarn.Text = ex.Message; } aspPager.RecordCount = recount; }
protected void btnFind_Click(object sender, EventArgs e) { condObj = new CRM_CUST(); if (txtCus_ID.Value != "") { condObj.Like(CRM_CUST.Attribute.Cus_ID, Convert.ToInt32(txtCus_ID.Value)); } if (txtCus_Name.Value != "") { condObj.Like(CRM_CUST.Attribute.Cus_Name, Convert.ToString(txtCus_Name.Value)); } if (txtJob.Value != "") { condObj.Like(CRM_CUST.Attribute.Job, Convert.ToString(txtJob.Value)); } if (txtRelationTxt.Value != "") { condObj.Like(CRM_CUST.Attribute.RelationTxt, Convert.ToString(txtRelationTxt.Value)); } if (txtRecorder.Value != "") { condObj.Like(CRM_CUST.Attribute.Recorder, Convert.ToString(txtRecorder.Value)); } if (txtMobPhone.Value != "") { condObj.Like(CRM_CUST.Attribute.MobPhone, Convert.ToString(txtMobPhone.Value)); } if (txtPhone.Value != "") { condObj.Like(CRM_CUST.Attribute.Phone, Convert.ToString(txtPhone.Value)); } if (txtContactName.Value != "") { condObj.Like(CRM_CUST.Attribute.ContactName, Convert.ToString(txtContactName.Value)); } if (txtShopName.Value != "") { condObj.Like(CRM_CUST.Attribute.ShopName, Convert.ToString(txtShopName.Value)); } if (txtShopAddr.Value != "") { condObj.Like(CRM_CUST.Attribute.ShopAddr, Convert.ToString(txtShopAddr.Value)); } if (txtQQ.Value != "") { condObj.Like(CRM_CUST.Attribute.QQ, Convert.ToString(txtQQ.Value)); } if (txtWW.Value != "") { condObj.Like(CRM_CUST.Attribute.WW, Convert.ToString(txtWW.Value)); } if (txtEmail.Value != "") { condObj.Like(CRM_CUST.Attribute.Email, Convert.ToString(txtEmail.Value)); } if (txtAddress.Value != "") { condObj.Like(CRM_CUST.Attribute.Address, Convert.ToString(txtAddress.Value)); } if (txtTrade.Value != "") { condObj.Like(CRM_CUST.Attribute.Trade, Convert.ToString(txtTrade.Value)); } if (txtType.Value != "") { condObj.Like(CRM_CUST.Attribute.Type, Convert.ToInt32(txtType.Value)); } if (txtState.Value != "") { condObj.State = Convert.ToInt32(txtState.Value); } if (txtIsSign.Value != "") { condObj.IsSign = Convert.ToInt32(txtIsSign.Value); } if (txtAddTime.Value != "") { condObj.Like(CRM_CUST.Attribute.AddTime, Convert.ToDateTime(txtAddTime.Value)); } if (txtEditTime.Value != "") { condObj.Like(CRM_CUST.Attribute.EditTime, Convert.ToDateTime(txtEditTime.Value)); } if (txtPATH.Value != "") { condObj.Like(CRM_CUST.Attribute.PATH, Convert.ToString(txtPATH.Value)); } if (txtPNAME.Value != "") { condObj.Like(CRM_CUST.Attribute.PNAME, Convert.ToString(txtPNAME.Value)); } hidCondition.Value = condObj.ToJson(20); BindList(condObj, 1); }
protected void btnFind_Click(object sender, EventArgs e) { try { condObj = new CRM_CUST(); if (txtCus_ID.Value != "") { condObj.Like(CRM_CUST.Attribute.Cus_ID, Convert.ToInt32(txtCus_ID.Value)); } if (txtCus_Name.Value != "") { condObj.Like(CRM_CUST.Attribute.Cus_Name, Convert.ToString(txtCus_Name.Value)); } if (txtJob.Value != "") { condObj.Like(CRM_CUST.Attribute.Job, Convert.ToString(txtJob.Value)); } if (txtRelationTxt.Value != "") { condObj.Like(CRM_CUST.Attribute.RelationTxt, Convert.ToString(txtRelationTxt.Value)); } if (txtRecorder.Value != "") { condObj.Like(CRM_CUST.Attribute.Recorder, Convert.ToString(txtRecorder.Value)); } if (txtMobPhone.Value != "") { condObj.Like(CRM_CUST.Attribute.MobPhone, Convert.ToString(txtMobPhone.Value)); } if (txtPhone.Value != "") { condObj.Like(CRM_CUST.Attribute.Phone, Convert.ToString(txtPhone.Value)); } if (txtContactName.Value != "") { condObj.Like(CRM_CUST.Attribute.ContactName, Convert.ToString(txtContactName.Value)); } if (txtShopName.Value != "") { condObj.Like(CRM_CUST.Attribute.ShopName, Convert.ToString(txtShopName.Value)); } if (txtShopAddr.Value != "") { condObj.Like(CRM_CUST.Attribute.ShopAddr, Convert.ToString(txtShopAddr.Value)); } if (txtQQ.Value != "") { condObj.Like(CRM_CUST.Attribute.QQ, Convert.ToString(txtQQ.Value)); } if (txtWW.Value != "") { condObj.Like(CRM_CUST.Attribute.WW, Convert.ToString(txtWW.Value)); } if (txtEmail.Value != "") { condObj.Like(CRM_CUST.Attribute.Email, Convert.ToString(txtEmail.Value)); } if (txtAddress.Value != "") { condObj.Like(CRM_CUST.Attribute.Address, Convert.ToString(txtAddress.Value)); } if (txtTrade.Value != "") { condObj.Like(CRM_CUST.Attribute.Trade, Convert.ToString(txtTrade.Value)); } if (txtType.Value != "") { condObj.Like(CRM_CUST.Attribute.Type, Convert.ToInt32(txtType.Value)); } if (txtState.Value != "") { condObj.State = Convert.ToInt32(txtState.Value); } if (txtIsSign.Value != "") { condObj.IsSign = Convert.ToInt32(txtIsSign.Value); } if (txtAddTime.Value != "") { condObj.Like(CRM_CUST.Attribute.AddTime, Convert.ToDateTime(txtAddTime.Value)); } if (txtEditTime.Value != "") { condObj.Like(CRM_CUST.Attribute.EditTime, Convert.ToDateTime(txtEditTime.Value)); } if (txtPATH.Value != "") { condObj.Like(CRM_CUST.Attribute.PATH, Convert.ToString(txtPATH.Value)); } if (txtPNAME.Value != "") { condObj.Like(CRM_CUST.Attribute.PNAME, Convert.ToString(txtPNAME.Value)); } listObj = BLLTable <CRM_CUST> .Factory(conn).SelectByPage(valObj, condObj, aspPager.PageSize, 1, ref recount); repCus.DataSource = listObj; repCus.DataBind(); } catch (Exception ex) { litWarn.Text = ex.Message; } aspPager.RecordCount = recount; }