private void BuyPaymentForm_Load(object sender, EventArgs e) { try { //绑定采购明细 DataTable dt = ch.DataTableReCoding(bpm.SelEmp(" buy.Buy_Code='" + XYEEncoding.strCodeHex(_buycode) + "'").Tables[0]); superGridControl1.PrimaryGrid.DataSource = dt; superGridControl1.PrimaryGrid.AllowEdit = false; LoginInfomation l = LoginInfomation.getInstance(); l.UserName = "******"; ltxt_operation.Text = l.UserName; txt_yifu.Visible = false; ltxt_weipay.ReadOnly = true; dataGridViewFujia.ReadOnly = true; dataGridViewFujia.AllowUserToResizeColumns = false; //是否可以调整列的大小 dataGridViewFujia.AllowUserToResizeRows = false; //是否可以调整行的大小 txt_caigoucode.Text = _buycode; ltxt_suname.Text = _suname; ltxt_AccountName.Text = _acountname; txt_shif.Text = _fukuan; ltxt_saleman.Text = _saleman; } catch (Exception ex) { MessageBox.Show("错误代码:3205-创建采购付款单异常,异常信息:" + ex.Message); } textBoxOddNumbers.Text = BuildCode.ModuleCode("AP"); }
private void BuyFollowInformation_Load(object sender, EventArgs e) { LoginInfomation l = LoginInfomation.getInstance(); l.UserName = "******"; txt_caozuoman.Text = l.UserName; txt_buycode.Text = _buycode; }
private void buttonXLogin_Click(object sender, EventArgs e) { User u = new User(); UserManager um = new UserManager(); PermissionManager pm = new PermissionManager(); string name = textBoxXName.Text.Trim(); string password = textBoxXPassword.Text.Trim(); if (string.IsNullOrWhiteSpace(name)) { labelName.Visible = true; labelNull.Text = "请输入用户名"; labelNull.Visible = true; } else if (string.IsNullOrWhiteSpace(password)) { labelPW.Visible = true; labelNull.Text = "请输入密码"; labelNull.Visible = true; } else { if (!um.Exists(name)) { labelName.Visible = false; labelPW.Visible = false; labelNull.Text = "用户名不存在"; labelNull.Visible = true; return; } DataTable user = um.GetUserAndRoleModel(name, password); if (user.Rows.Count > 0) { LoginInfomation information = LoginInfomation.getInstance(); information.UserName = user.Rows[0]["User_Name"].ToString(); information.UserRole = user.Rows[0]["Role_Name"].ToString(); information.UserCode = user.Rows[0]["User_Code"].ToString(); //根据角色里的权限编码查询所拥有的权限信息 DataSet permission = pm.GetList("Per_Code = '" + XYEEncoding.strCodeHex(user.Rows[0]["Role_Modules"].ToString()) + "'"); getPermissionList(permission); Close(); } else { labelNull.Text = "密码不正确"; labelNull.Visible = true; } } }
/// <summary> /// 获取所有的权限列表并存储 /// </summary> /// <param name="ds"></param> private void getPermissionList(DataSet ds) { LoginInfomation information = LoginInfomation.getInstance(); foreach (DataRow dr in ds.Tables[0].Rows) { if ((int)dr["Per_ReadState"] == 1) { information.ReadPermission.Add(dr["Per_ModuleName"].ToString()); } if ((int)dr["Per_WriteState"] == 1) { information.WritePermission.Add(dr["Per_ModuleName"].ToString()); } if ((int)dr["Per_AuditState"] == 1) { information.AuditPermission.Add(dr["Per_ModuleName"].ToString()); } } }
private void InsSellGathering_Load(object sender, EventArgs e) { #region 初始化列 GridColumn gc = null; gc = new GridColumn(); gc.DataPropertyName = "Sell_Code"; gc.Name = "Code"; gc.HeaderText = "销售单号"; superGridControl1.PrimaryGrid.Columns.Add(gc); gc = new GridColumn(); gc.DataPropertyName = "Sell_StockName"; gc.Name = "StockName"; gc.HeaderText = "仓库名称"; superGridControl1.PrimaryGrid.Columns.Add(gc); gc = new GridColumn(); gc.DataPropertyName = "Sell_MaID"; gc.Name = "MaID"; gc.HeaderText = "编码"; superGridControl1.PrimaryGrid.Columns.Add(gc); gc = new GridColumn(); gc.DataPropertyName = "Sell_MaName"; gc.Name = "MaName"; gc.HeaderText = "商品名称"; superGridControl1.PrimaryGrid.Columns.Add(gc); gc = new GridColumn(); gc.DataPropertyName = "Sell_Model"; gc.Name = "Model"; gc.HeaderText = "规格型号"; superGridControl1.PrimaryGrid.Columns.Add(gc); gc = new GridColumn(); gc.DataPropertyName = "Sell_Unit"; gc.Name = "Unit"; gc.HeaderText = "单位"; superGridControl1.PrimaryGrid.Columns.Add(gc); gc = new GridColumn(); gc.DataPropertyName = "Sell_DiscountBPrice"; gc.Name = "DiscountBPrice"; gc.HeaderText = "单价"; superGridControl1.PrimaryGrid.Columns.Add(gc); gc = new GridColumn(); gc.DataPropertyName = "Sell_CurNumber"; gc.Name = "CurNumber"; gc.HeaderText = "需求数量"; superGridControl1.PrimaryGrid.Columns.Add(gc); gc = new GridColumn(); gc.DataPropertyName = "Sell_ReNumber"; gc.Name = "ReNumber"; gc.HeaderText = "实发数量"; superGridControl1.PrimaryGrid.Columns.Add(gc); gc = new GridColumn(); gc.DataPropertyName = "Sell_LostNumber"; gc.Name = "LostNumber"; gc.HeaderText = "缺少数量"; superGridControl1.PrimaryGrid.Columns.Add(gc); gc = new GridColumn(); gc.DataPropertyName = "Sell_Discount"; gc.Name = "Discount"; gc.HeaderText = "折扣率"; superGridControl1.PrimaryGrid.Columns.Add(gc); gc = new GridColumn(); gc.DataPropertyName = "Sell_DiscountBPrice"; gc.Name = "DiscountBPrice"; gc.HeaderText = "折后金额"; superGridControl1.PrimaryGrid.Columns.Add(gc); gc = new GridColumn(); gc.DataPropertyName = "Sell_Money"; gc.Name = "Money"; gc.HeaderText = "总金额"; superGridControl1.PrimaryGrid.Columns.Add(gc); gc = new GridColumn(); gc.DataPropertyName = "Sell_Remark"; gc.Name = "Remark"; gc.HeaderText = "备注"; superGridControl1.PrimaryGrid.Columns.Add(gc); superGridControl1.PrimaryGrid.DataSource = sdm.GetList(string.Format("Sell_Code='{0}'", XYEEncoding.strCodeHex(Sell_Code))); #endregion //ltxt_salecode.Text = Sell_Code; ; //ltxt_kehu.Text = C_ClientName; //ltxt_AccountName.Text = C_AccountName; //ltxt_yingshou.Text = C_AmountPay; ltxt_shishou.Text = "0"; ltxt_weishou.Text = "0"; ltxt_shoukuan.Text = "0"; ltxt_yingshou.Text = "0"; // ltxt_salecode.Text = _sellcode; Model.Sell sell = sm.SelSellGatheringBySellCode(ltxt_salecode.Text.Trim()); ltxt_salecode.Text = _sellcode; ltxt_kehu.Text = _Sell_ClientName; ltxt_yingshou.Text = Convert.ToDecimal(_OddMoney).ToString("0.00"); ltxt_shoukuan.Text = Convert.ToDecimal(_InMoney).ToString("0.00"); ltxt_weishou.Text = Convert.ToDecimal(_LastMoney).ToString("0.00"); ltxt_method.Text = _fukuanfangshi; ltxt_saleman.Text = _Salesman; ltxt_remark.Text = _Remark; //if (sell != null) //{ // ltxt_salecode.Text = _sellcode; // ltxt_kehu.Text = sell.Sell_ClientName; // ltxt_AccountName.Text = sell.Sell_AccountCode; // ltxt_yingshou.ReadOnly = true; // ltxt_yingshou.Text = Convert.ToDecimal(sell.Sell_OddMoney).ToString("0.00"); // ltxt_shoukuan.Text = Convert.ToDecimal(sell.Sell_InMoney).ToString("0.00"); // ltxt_weishou.Text = Convert.ToDecimal(sell.Sell_LastMoney).ToString("0.00"); // ltxt_method.Text = sell.Sell_fukuanfangshi; // ltxt_saleman.Text = sell.Sell_Salesman; // ltxt_operation.Text = sell.Sell_Operation; // ltxt_remark.Text = sell.Sell_Remark; // ltxt_weishou.Text = sell.Sell_OddMoney; //} if (string.IsNullOrWhiteSpace(textBoxOddNumbers.Text)) { textBoxOddNumbers.Text = BuildCode.ModuleCode("AC"); conll.C_No = textBoxOddNumbers.Text;//资金收款编号 } //ltxt_salecode.Text //textBoxX1.Text = "0"; //制单人 LoginInfomation l = LoginInfomation.getInstance(); l.UserName = "******"; ltxt_operation.Text = l.UserName; dataGridViewFujia.ReadOnly = true; dataGridViewFujia.AllowUserToResizeColumns = false; //是否可以调整列的大小 dataGridViewFujia.AllowUserToResizeRows = false; //是否可以调整行的大小 }