/*public int Login() * { * try * { * //逻辑变更 * //1.判断是否联网状态 * //2 如果是联网状态 获取同步用户数据 * //3.验证登录使用逻辑 * if (this.FixListObject != null) * { * //判断加密狗是否正常工作 * int result = this.GlodSoftDiscern.Completed(); * if (_GlodSoftDiscern.TRY_SUCCESS == result) * { * //本地加密狗验证 * CEntitySuomanager info = null; * int r = this.FixListObject.Login(this.GlodSoftDiscern.CurrNo, ref info); * this.CurrentCustom = info; * this.ErrorInfmation = this.FixListObject.GetErrorInfmation; * this.ClientResult.Result = _ClientResult.Client_Result_Success; * * return r; * } * else if (_GlodSoftDiscern.TRY_ERROR_NOFUNCTION == result) * { * this.ErrorInfmation = "没有此功能,请联系售后人员。"; * int nor = ResultConst.SERVER_ERROR; * this.ClientResult.Result = _ClientResult.Client_Result_Error; * return nor; * } * else * { * this.ErrorInfmation = "没有找到加密狗!"; * int nor = ResultConst.SERVER_ERROR; * this.ClientResult.Result = _ClientResult.Client_Result_Error; * return nor; * } * * } * return -1; * } * catch (Exception ex) * { * this.ErrorInfmation = "服务没有找到"; * return ResultConst.SERVER_ERROR; * } * }*/ /// <summary> /// 常规验证(当前类中 循环调用) /// </summary> /// <returns></returns> public int AWayLogin() { try { if (this.FixListObject != null) { if (_GlodSoftDiscern.TRY_SUCCESS == this.GlodSoftDiscern.Completed()) { //本地加密狗验证 CEntitySuomanager info = null; int r = this.FixListObject.AWayLogin(this.GlodSoftDiscern.CurrNo, ref info); APP.GoldSoftClient.m_CurrentCustom = info; this.ErrorInfmation = this.FixListObject.GetErrorInfmation; return(r); } else { this.ErrorInfmation = "没有找到加密狗!"; int nor = ResultConst.SERVER_ERROR; return(nor); } } return(-1); } catch { this.ErrorInfmation = "服务没有找到"; return(ResultConst.SERVER_ERROR); } }
/// <summary> /// 获取用户所有信息 /// </summary> /// <param name="wb_web">连接</param> /// <param name="jmLock">锁号</param> public static void BDsuoManager(string wb_web, string jmLock) { //调用远程方法 获取资料 DataTable dtsuoManager = WebServiceHelper.InvokeMethod <DataTable>(wb_web, "getSuoManagerInfoByJmLock", jmLock); CEntitySuomanager cSuoManager = new CEntitySuomanager(); cSuoManager.ID = long.Parse(dtsuoManager.Rows[0]["ID"].ToString()); cSuoManager.ADDRESS = dtsuoManager.Rows[0]["ADDRESS"].ToString(); cSuoManager.AREA = dtsuoManager.Rows[0]["AREA"].ToString(); cSuoManager.BANK = dtsuoManager.Rows[0]["BANK"].ToString(); cSuoManager.CITY = dtsuoManager.Rows[0]["CITY"].ToString(); cSuoManager.CUSTOMERNAME = dtsuoManager.Rows[0]["CUSTOMERNAME"].ToString(); cSuoManager.CW_REMARK = dtsuoManager.Rows[0]["CW_REMARK"].ToString(); cSuoManager.CW_SUBMIT = dtsuoManager.Rows[0]["CW_SUBMIT"].ToString(); cSuoManager.DWXZ = dtsuoManager.Rows[0]["DWXZ"].ToString(); cSuoManager.ENDTIME = dtsuoManager.Rows[0]["ENDTIME"].ToString(); cSuoManager.IDCARD = dtsuoManager.Rows[0]["IDCARD"].ToString(); cSuoManager.INTERLOCK = dtsuoManager.Rows[0]["INTERLOCK"].ToString(); cSuoManager.ISFIRST = dtsuoManager.Rows[0]["ISFIRST"].ToString(); cSuoManager.ISGX = dtsuoManager.Rows[0]["ISGX"].ToString(); cSuoManager.ISPASS = dtsuoManager.Rows[0]["ISPASS"].ToString(); cSuoManager.ISYZ = dtsuoManager.Rows[0]["ISYZ"].ToString(); cSuoManager.JMLOCK = dtsuoManager.Rows[0]["JMLOCK"].ToString(); cSuoManager.KTTIME = dtsuoManager.Rows[0]["KTTIME"].ToString(); cSuoManager.LY_REMARK = dtsuoManager.Rows[0]["LY_REMARK"].ToString(); cSuoManager.LY_SUBMIT = dtsuoManager.Rows[0]["LY_SUBMIT"].ToString(); cSuoManager.MONEY = dtsuoManager.Rows[0]["MONEY"].ToString(); cSuoManager.MOVETEL = dtsuoManager.Rows[0]["MOVETEL"].ToString(); cSuoManager.OLDLOCK = dtsuoManager.Rows[0]["OLDLOCK"].ToString(); cSuoManager.PH = dtsuoManager.Rows[0]["PH"].ToString(); cSuoManager.POSITION = dtsuoManager.Rows[0]["POSITION"].ToString(); cSuoManager.POSTCODE = dtsuoManager.Rows[0]["POSTCODE"].ToString(); cSuoManager.PROFESSION = dtsuoManager.Rows[0]["PROFESSION"].ToString(); cSuoManager.PROVINCE = dtsuoManager.Rows[0]["PROVINCE"].ToString(); cSuoManager.QQ = dtsuoManager.Rows[0]["QQ"].ToString(); cSuoManager.REASON = dtsuoManager.Rows[0]["REASON"].ToString(); cSuoManager.REMARK = dtsuoManager.Rows[0]["REMARK"].ToString(); cSuoManager.SERVICE_PERSON = dtsuoManager.Rows[0]["SERVICE_PERSON"].ToString(); cSuoManager.SEX = dtsuoManager.Rows[0]["SEX"].ToString(); cSuoManager.SOFT_USE = dtsuoManager.Rows[0]["SOFT_USE"].ToString(); cSuoManager.SQTIME = dtsuoManager.Rows[0]["SQTIME"].ToString(); cSuoManager.STATUS = dtsuoManager.Rows[0]["STATUS"].ToString(); cSuoManager.TEL = dtsuoManager.Rows[0]["TEL"].ToString(); cSuoManager.USE_COUNT = long.Parse(dtsuoManager.Rows[0]["USE_COUNT"].ToString()); cSuoManager.USE_TIME = long.Parse(dtsuoManager.Rows[0]["USE_TIME"].ToString()); cSuoManager.VERSION = dtsuoManager.Rows[0]["VERSION"].ToString(); cSuoManager.VERSION_SUBMIT = dtsuoManager.Rows[0]["VERSION_SUBMIT"].ToString(); cSuoManager.XINGZHI = dtsuoManager.Rows[0]["XINGZHI"].ToString(); cSuoManager.ZCDWNAME = dtsuoManager.Rows[0]["ZCDWNAME"].ToString(); APP.GXKG = dtsuoManager.Rows[0]["isgx"].ToString().Equals("共享") ? true : false; APP.ZGFAKG = dtsuoManager.Rows[0]["cw_submit"].ToString().Equals("共享") ? true : false; APP.BCQDKG = dtsuoManager.Rows[0]["ly_submit"].ToString().Equals("共享") ? true : false; APP.GoldSoftClient.CurrentCustom = cSuoManager; //this.cEntitySuomanagerBindingSource.DataSource = dtsuoManager; }
/// <summary> /// 获取用户信息 /// </summary> /// <param name="info"></param> /// <returns></returns> public static DataTable getTable(CEntitySuomanager info) { // 获取输入信息 CustomBAL.createTable(); DataRow dr = CustomBAL.dt.NewRow(); dr["id"] = info.ID; dr["interlock"] = info.JMLOCK; dr["version"] = info.VERSION; dr["xingzhi"] = info.XINGZHI; dr["oldLock"] = info.OLDLOCK; dr["province"] = info.PROVINCE; dr["city"] = info.CITY; dr["area"] = info.AREA; dr["customerName"] = info.CUSTOMERNAME; dr["sex"] = info.SEX; dr["profession"] = info.PROFESSION; dr["position"] = info.POSITION; dr["dwxz"] = info.DWXZ; dr["zcdwName"] = info.ZCDWNAME; dr["idcard"] = info.IDCARD; dr["soft_use"] = info.SOFT_USE; dr["address"] = info.ADDRESS; dr["tel"] = info.TEL; dr["moveTel"] = info.MOVETEL; dr["postcode"] = info.POSTCODE; dr["qq"] = info.QQ; dr["money"] = info.MONEY; dr["service_person"] = info.SERVICE_PERSON; dr["sqTime"] = info.SQTIME; dr["ktTime"] = info.KTTIME; dr["status"] = "变更"; dr["endTime"] = info.ENDTIME; dr["version_submit"] = info.VERSION_SUBMIT; dr["cw_submit"] = info.CW_SUBMIT; dr["ly_submit"] = info.LY_SUBMIT; dr["use_count"] = info.USE_COUNT; dr["use_time"] = info.USE_TIME; dr["cw_remark"] = info.CW_REMARK; dr["ly_remark"] = info.LY_REMARK; dr["PH"] = info.PH; dr["bank"] = info.BANK; dr["remark"] = info.REMARK; dt.Rows.Add(dr); return(dt); }
/// <summary> /// 提交数据到服务器 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void simpleButton1_Click1(object sender, EventArgs e) { //获取输入信息 CEntitySuomanager info = this.cEntitySuomanagerBindingSource.Current as CEntitySuomanager; int result = APP.GoldSoftClient.TryUpdateCustomer(info); if (result == ResultConst.SERVER_SUCCESS) { //成功 MsgBox.Alert("资料已经提交成功等待审核"); this.Close(); } else { MsgBox.Alert("提交失败,稍后尝试!"); } }
/// <summary> /// 提交当前用户信息 /// </summary> /// <returns></returns> public int TryUpdateCustomer(CEntitySuomanager p_Info) { try { if (this.FixListObject != null) { string str = this.FixListObject.TryUpDate(ref p_Info); if (str != "-1" && str != "-2") { this.CurrentCustom = p_Info; } } return(0); } catch (Exception ex) { //出现异常提示服务端口通信失败 //return _GlodSoftNetWork.TRY_SERVER_ERROR; return(1); } }
public void CreateInstance() { if (FixListObject == null) { try { TcpClientChannel channel = new TcpClientChannel(); ChannelServices.RegisterChannel(channel, false); FixListObject = (IFixListObject)Activator.GetObject(typeof(IFixListObject), "tcp://127.0.0.1:6957/IFixListObject"); //FixListObject = (IFixListObject)Activator.GetObject(typeof(IFixListObject), "tcp://127.0.0.1:6957/IFixListObject"); CEntitySuomanager info = null; int r = this.FixListObject.Login(this.GlodSoftDiscern.CurrNo, ref info); //int a = FixListObject.Login(); //ChannelServices.UnregisterChannel(channel); } catch (Exception ex) { throw ex; } } }
/// <summary> /// 登录系统(首次登陆调用) /// 1.判断加密狗是否正常工作 /// 2.判断网络是否正常工作 /// </summary> /// <returns></returns> public int ALogin() { ///是否使用离线逻辑(默认为True) bool bIsOffline = true; try { //逻辑变更 //0.判断能否直接使用 //1.判断是否联网状态 //2 如果是联网状态 获取同步用户数据 //3.验证登录使用逻辑 if (APP.GoldSoftClient.ClientResult.IsUseNet && APP.GoldSoftClient.ClientResult.IsLoginSucess) { //有网络且完全通过 if (this.FixListObject != null) { //调用网络数据同步逻辑 CEntitySuomanager info = null; int r = this.FixListObject.Login(this.GlodSoftDiscern.CurrNo, ref info); //没有用户数据 if (r == ResultConst.SERVER_CUSTOM_NO_INIT) { //非法的加密锁 //bIsOffline = true; //return ResultConst.SERVER_CUSTOM_NO_INIT; } if (r == ResultConst.SERVER_SUCCESS) { this.CurrentCustom = info; this.ErrorInfmation = this.FixListObject.GetErrorInfmation; this.ClientResult.Result = _ClientResult.Client_Result_Success; //同步更新数据 清理 //不再处理使用次数 //this.ClientResult.UseCount += this.CurrentCustom.USE_COUNT; //this.ClientResult.DateCount += 1; this.ClientResult.State = this.CurrentCustom.STATUS; this.ClientResult.Fun = long.Parse(this.CurrentCustom.VERSION_SUBMIT); this.CustomCompleted(); //同步数据 info.USE_COUNT = this.ClientResult.UseCount; info.USE_TIME = this.ClientResult.DateCount; bIsOffline = !this.FixListObject.setSuoCountAndTime(info); if (!bIsOffline) { this.ClientResult.UseCount = 0; this.ClientResult.DateCount = 0; //重写 this.GlodSoftDiscern.WriteHandle(this.ClientResult.ToHandleString()); //this.FixListObject.TryUpDate(ref info); bIsOffline = false; } } else { bIsOffline = true; } } } if (bIsOffline) { this.ClientResult.DateCount += 1; //进行一次离线记录 this.GlodSoftDiscern.WriteHandle(this.ClientResult.ToHandleString()); } return(ResultConst.SERVER_SUCCESS); } catch (Exception ex) { this.ErrorInfmation = ex.Message; return(ResultConst.SERVER_ERROR); } }
/// <summary> /// 登录系统(首次登陆调用) /// 1.判断加密狗是否正常工作 /// 2.判断网络是否正常工作 /// </summary> /// <returns></returns> public int Login() { ///是否使用离线逻辑(默认为True) bool bIsOffline = true; try { //逻辑变更 //0.判断能否直接使用 //1.判断是否联网状态 //2 如果是联网状态 获取同步用户数据 //3.验证登录使用逻辑 if (APP.GoldSoftClient.ClientResult.IsUseNet && APP.GoldSoftClient.ClientResult.IsLoginSucess) { //有网络且完全通过 if (this.FixListObject != null) { //调用网络数据同步逻辑 CEntitySuomanager info = null; int r = this.FixListObject.Login(this.GlodSoftDiscern.CurrNo, ref info); //没有用户数据 if (r == ResultConst.SERVER_CUSTOM_NO_INIT) { //非法的加密锁 this.ClientResult.Custom_IsOwner = false; this.Can_Use_System = false; return(ResultConst.SERVER_CUSTOM_NO_INIT); } if (r == ResultConst.SERVER_SUCCESS) { //执行成功 this.Can_Use_System = true; this.CurrentCustom = info; string wb_web = CSystem.GetAppConfig("wb"); //TODO:判斷積分問題 //int jifen = WebServiceHelper.InvokeMethod<int>(wb_web, "getJiFenJL", APP.GoldSoftClient.CurrentCustom.JMLOCK); //if (jifen < 0) //{ // return -11; // //MsgBox.Alert("由于您的积分为负数,软件不能使用!请先购买积分!"); // //Application.Exit(); //} //加载 用户价格库开关 string jmLock = APP.GoldSoftClient.CurrentCustom.JMLOCK; //绑定锁引用方式 //string wb_web = CSystem.GetAppConfig("wb"); CustomBAL.BDsuoManager(wb_web, jmLock); CustomBAL.BDsuoManagerExtendInfo(wb_web, jmLock); this.ErrorInfmation = this.FixListObject.GetErrorInfmation; this.ClientResult.Result = _ClientResult.Client_Result_Success; //同步更新数据 清理 this.ClientResult.State = this.CurrentCustom.STATUS; this.ClientResult.Fun = ToolKit.ParseInt(this.CurrentCustom.VERSION_SUBMIT); //此处进行客户信息验证 this.CustomCompleted(); info.USE_COUNT = this.ClientResult.UseCount; info.USE_TIME = this.ClientResult.DateCount; //同步数据 bIsOffline = !this.FixListObject.setSuoCountAndTime(info); if (!bIsOffline) { this.ClientResult.UseCount = 0; this.ClientResult.DateCount = 0; //重写 this.GlodSoftDiscern.WriteHandle(this.ClientResult.ToHandleString()); bIsOffline = false; } } else { bIsOffline = true; } } } if (bIsOffline) { this.ClientResult.UseCount += 1; //进行一次离线记录 this.GlodSoftDiscern.WriteHandle(this.ClientResult.ToHandleString()); APP.GoldSoftClient.ClientResult.Custom_CanUse = true; } return(ResultConst.SERVER_SUCCESS); } catch (Exception ex) { this.ErrorInfmation = ex.Message; return(ResultConst.SERVER_SERVER_ERROR); } }
/// <summary> /// 提交数据到服务器 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void simpleButton1_Click1(object sender, EventArgs e) { if (string.IsNullOrEmpty(txt_CUSTOMERNAME.Text.Trim())) { MessageBox.Show("姓名不能为空", "金建软件"); txt_CUSTOMERNAME.Focus(); return; } if (string.IsNullOrEmpty(textEdit1.Text.Trim())) { MessageBox.Show("锁号不能为空", "金建软件"); textEdit1.Focus(); return; } if (string.IsNullOrEmpty(textEdit2.Text.Trim())) { MessageBox.Show("注册日期不能为空", "金建软件"); textEdit2.Focus(); return; } if (string.IsNullOrEmpty(txt_ZCDWNAME.Text.Trim())) { MessageBox.Show("单位名称不能围为空", "金建软件"); txt_ZCDWNAME.Focus(); return; } if (string.IsNullOrEmpty(textEdit3.Text.Trim())) { MessageBox.Show("单位性质不能围为空", "金建软件"); textEdit3.Focus(); return; } if (string.IsNullOrEmpty(txt_TEL.Text.Trim()) && string.IsNullOrEmpty(txtMovTel.Text.Trim())) { MessageBox.Show("电话或手机必须填一个", "金建软件"); txtMovTel.Focus(); return; } if (string.IsNullOrEmpty(textEdit6.Text.Trim())) { MessageBox.Show("职务不能为空", "金建软件"); textEdit6.Focus(); return; } if (string.IsNullOrEmpty(txt_PROFESSION.Text.Trim())) { MessageBox.Show("预算专业不能为空", "金建软件"); txt_PROFESSION.Focus(); return; } if (string.IsNullOrEmpty(txtIdCard.Text.Trim())) { MessageBox.Show("身份证号不能为空", "金建软件"); txtIdCard.Focus(); return; } //获取输入信息 CEntitySuomanager info = this.cEntitySuomanagerBindingSource.Current as CEntitySuomanager; int result = APP.GoldSoftClient.TryUpdateCustomer(info); if (result == ResultConst.SERVER_SUCCESS) { //成功 MsgBox.Alert("资料已经提交成功等待审核"); this.Close(); } else { MsgBox.Alert("提交失败,稍后尝试!"); } }
public static DataTable getExtendTable(CEntitySuomanager info) { /** * DataRow dr = CustomBAL.dt.NewRow(); * this.rd_y_yhcl.Checked = APP.GXKG; * this.rd_y_zjfa.Checked = APP.ZGFAKG; * this.rd_y_bcde.Checked = APP.BCQDKG; */ CustomBAL.createExtendTable(); string JMLOCK = APP.GoldSoftClient.CurrentCustom.JMLOCK; DataRow drExtend = CustomBAL.dtExtend.NewRow(); drExtend = dtExtend.NewRow(); drExtend["id"] = "0"; drExtend["JMLOCK"] = JMLOCK; drExtend["suoManagerId"] = ""; drExtend["name"] = "用户材料价格存储与引用方式"; if (APP.GXKG) { drExtend["value"] = "共享"; } else { drExtend["value"] = "不共享"; } drExtend["userId"] = "0"; drExtend["insertTime"] = ""; drExtend["remark"] = ""; dtExtend.Rows.Add(drExtend); drExtend = CustomBAL.dtExtend.NewRow(); drExtend["id"] = "0"; drExtend["JMLOCK"] = JMLOCK; drExtend["suoManagerId"] = ""; drExtend["name"] = "组价方案存储与引用方式"; if (APP.ZGFAKG) { drExtend["value"] = "共享"; } else { drExtend["value"] = "不共享"; } drExtend["userId"] = "0"; drExtend["insertTime"] = ""; drExtend["remark"] = ""; dtExtend.Rows.Add(drExtend); drExtend = CustomBAL.dtExtend.NewRow(); drExtend["id"] = "0"; drExtend["JMLOCK"] = JMLOCK; drExtend["suoManagerId"] = ""; drExtend["name"] = "补充清单,定额,材料与引用方式"; if (APP.BCQDKG) { drExtend["value"] = "共享"; } else { drExtend["value"] = "不共享"; } drExtend["userId"] = "0"; drExtend["insertTime"] = ""; drExtend["remark"] = ""; dtExtend.Rows.Add(drExtend); return(dtExtend); }
//public DataTable dtExtend = null; //private DataTable getExtendTable(CEntitySuomanager info) //{ // string JMLOCK = APP.GoldSoftClient.CurrentCustom.JMLOCK; // DataRow drExtend = null; // drExtend = dtExtend.NewRow(); // drExtend["id"] = "0"; // drExtend["JMLOCK"] = JMLOCK; // drExtend["suoManagerId"] = ""; // drExtend["name"] = "补充清单,定额,材料与引用方式"; // if (this.rd_y_bcde.Checked) // { // drExtend["value"] = "共享"; // } // else // { // drExtend["value"] = "不共享"; // } // drExtend["userId"] = "0"; // drExtend["insertTime"] = ""; // drExtend["remark"] = ""; // dtExtend.Rows.Add(drExtend); // drExtend = dtExtend.NewRow(); // drExtend["id"] = "0"; // drExtend["JMLOCK"] = JMLOCK; // drExtend["suoManagerId"] = ""; // drExtend["name"] = "组价方案存储与引用方式"; // if (this.rd_y_zjfa.Checked) // { // drExtend["value"] = "共享"; // } // else // { // drExtend["value"] = "不共享"; // } // drExtend["userId"] = "0"; // drExtend["insertTime"] = ""; // drExtend["remark"] = ""; // dtExtend.Rows.Add(drExtend); // drExtend = dtExtend.NewRow(); // drExtend["id"] = "0"; // drExtend["JMLOCK"] = JMLOCK; // drExtend["suoManagerId"] = ""; // drExtend["name"] = "用户材料价格存储与引用方式"; // if (this.rd_y_yhcl.Checked) // { // drExtend["value"] = "共享"; // } // else // { // drExtend["value"] = "不共享"; // } // drExtend["userId"] = "0"; // drExtend["insertTime"] = ""; // drExtend["remark"] = ""; // dtExtend.Rows.Add(drExtend); // return dtExtend; //} ///// <summary> ///// 创建一个表suoManagerExtendInFo ///// </summary> ///// <returns>dtExtend</returns> //private DataTable createExtendTable() //{ // dtExtend = new DataTable(); // dtExtend.TableName = "suoManagerExtendInFo"; // dtExtend.Columns.Add("id", typeof(System.Int64)); // dtExtend.Columns.Add("JMLOCK", typeof(System.Int64)); // dtExtend.Columns.Add("suoManagerId", typeof(System.String)); // dtExtend.Columns.Add("name", typeof(System.String)); // dtExtend.Columns.Add("value", typeof(System.String)); // dtExtend.Columns.Add("userId", typeof(System.String)); // dtExtend.Columns.Add("insertTime", typeof(System.String)); // dtExtend.Columns.Add("remark", typeof(System.String)); // return dtExtend; //} /// <summary> /// 提交数据到服务器 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void simpleButton1_Click2(object sender, EventArgs e) { //建立表结构 //createTable(); CEntitySuomanager info = this.cEntitySuomanagerBindingSource.Current as CEntitySuomanager; //处理单选按钮事件 if (this.rd_man.Checked) { info.SEX = "男"; } else { info.SEX = "女"; } if (this.rd_y_bcde.Checked) { APP.BCQDKG = true; } else { APP.BCQDKG = false; } if (this.rd_y_yhcl.Checked) { APP.GXKG = true; } else { APP.GXKG = false; } if (this.rd_y_zjfa.Checked) { APP.ZGFAKG = true; } else { APP.ZGFAKG = false;; } //获取DataTable信息(修改信息 用户临时表) DataTable dt = CustomBAL.getTable(info); //DataTable dt = getTable(info); //获取用户共享表 DataTable dtExtend = CustomBAL.getExtendTable(info); /** * 8-14 * createExtendTable(); * DataTable dtExtend = getExtendTable(info); */ bool sigesuoManager = false; bool sigesuoManagerExtend = false; if (dt != null && dtExtend != null) { string wb_web = CSystem.GetAppConfig("wb"); sigesuoManager = CustomBAL.updateBDsuoManager(wb_web, dt); sigesuoManagerExtend = CustomBAL.updateBDsuoManagerExtendInfo(wb_web, dtExtend); if (sigesuoManager == true && sigesuoManagerExtend == true) { //成功 MsgBox.Alert("资料已经提交成功等待审核"); this.Close(); } else { MsgBox.Alert("提交失败,稍后尝试!"); } } else { MsgBox.Alert("提交失败,稍后尝试!"); } }
/// <summary> /// 提交数据到服务器 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void simpleButton1_Click1(object sender, EventArgs e) { if (string.IsNullOrEmpty(txt_CUSTOMERNAME.Text.Trim())) { MessageBox.Show("姓名不能为空", "金建软件"); txt_CUSTOMERNAME.Focus(); return; } if (string.IsNullOrEmpty(textEdit1.Text.Trim())) { MessageBox.Show("锁号不能为空", "金建软件"); textEdit1.Focus(); return; } if (string.IsNullOrEmpty(textEdit2.Text.Trim())) { MessageBox.Show("注册日期不能为空", "金建软件"); textEdit2.Focus(); return; } if (string.IsNullOrEmpty(txt_ZCDWNAME.Text.Trim())) { MessageBox.Show("单位名称不能围为空", "金建软件"); txt_ZCDWNAME.Focus(); return; } if (string.IsNullOrEmpty(textEdit3.Text.Trim())) { MessageBox.Show("单位性质不能围为空", "金建软件"); textEdit3.Focus(); return; } if (string.IsNullOrEmpty(txt_TEL.Text.Trim()) && string.IsNullOrEmpty(txtMovTel.Text.Trim())) { MessageBox.Show("电话或手机必须填一个", "金建软件"); txtMovTel.Focus(); return; } if (string.IsNullOrEmpty(textEdit6.Text.Trim())) { MessageBox.Show("职务不能为空", "金建软件"); textEdit6.Focus(); return; } if (string.IsNullOrEmpty(txt_PROFESSION.Text.Trim())) { MessageBox.Show("预算专业不能为空", "金建软件"); txt_PROFESSION.Focus(); return; } if (string.IsNullOrEmpty(txtIdCard.Text.Trim())) { MessageBox.Show("身份证号不能为空", "金建软件"); txtIdCard.Focus(); return; } //获取输入信息 CEntitySuomanager info = this.cEntitySuomanagerBindingSource.Current as CEntitySuomanager; if (this.rdo_nu.Checked) { info.SEX = "女"; } else { info.SEX = "男"; } if (rdo_use_unit.Checked) { info.SOFT_USE = "单位"; } else { info.SOFT_USE = "个人"; } if (this.rd_y_bcde.Checked) { APP.BCQDKG = true; } else { APP.BCQDKG = false; } if (this.rd_y_yhcl.Checked) { APP.GXKG = true; } else { APP.GXKG = false; } if (this.rd_y_zjfa.Checked) { APP.ZGFAKG = true; } else { APP.ZGFAKG = false;; } DataTable dtExtend = CustomBAL.getExtendTable(info); bool sigesuoManagerExtend = false; if (dtExtend != null) { string wb_web = CSystem.GetAppConfig("wb"); int result = APP.GoldSoftClient.TryUpdateCustomer(info); sigesuoManagerExtend = CustomBAL.updateBDsuoManagerExtendInfo(wb_web, dtExtend); if (sigesuoManagerExtend == true && result == ResultConst.SERVER_SUCCESS) { //成功 MsgBox.Alert("资料已经提交成功等待审核"); this.Close(); } else { MsgBox.Alert("提交失败,稍后尝试!"); } } else { MsgBox.Alert("提交失败,稍后尝试!"); } //if (result == ResultConst.SERVER_SUCCESS) //{ // //成功 // MsgBox.Alert("资料已经提交成功等待审核"); // this.Close(); //} //else //{ // MsgBox.Alert("提交失败,稍后尝试!"); //} }