| | |
| | | HUserName = ClsPub.isStrNull(DBUtility.ClsPub.CurUserName); |
| | | Int64 HUserID = 0; |
| | | HUserID = ClsPub.isInt(DBUtility.ClsPub.CurUserID); |
| | | txtHEmpID.Text = HUserName; |
| | | txtHEmpID.Tag = HUserID; |
| | | |
| | | DataSet DSet; |
| | | |
| | | DSet = oCn.RunProcReturn("Select HEmpID from gy_czygl Where czymc='" + HUserName + "'", "gy_czygl", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | |
| | | if (DSet == null) |
| | | //if (DSet == null|| DSet.Tables[0].Rows.Count == 0) |
| | | { |
| | | MessageBox.Show("没æè¿åä»»ä½ç»æ,请å¨è¿æ»¤æ¡ä¸ç¹å»ãæ¢å¤ãæé®,å°è¯å次æ¥è¯¢ï¼" + DBUtility.ClsPub.sExeReturnInfo); |
| | | return; |
| | | } |
| | | else |
| | | { |
| | | //grdMain.DataSource = DSet.Tables[0].DefaultView; |
| | | //æå½ååæ®ID åå°ä¸ä¸ªæé®éé¢ å·æ°æ¶æ¯æ¬¡åä¸é |
| | | if (DSet.Tables[0].Rows.Count > 0) |
| | | { |
| | | |
| | | |
| | | txtHEmpID.Tag = DBUtility.ClsPub.isStrNull(DSet.Tables[0].Rows[0]["HEmpID"]); |
| | | } |
| | | else |
| | | { |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | private void grdMain_DblClick(object sender, EventArgs e) |
| | |
| | | } |
| | | } |
| | | |
| | | private void zf_Click(object sender, EventArgs e) |
| | | { |
| | | //Sub_AbandonCheck(); |
| | | if (!ClsPub.Security_Log(ModRightNameDelete, 1, true, DBUtility.ClsPub.CurUserName)) |
| | | { |
| | | return; |
| | | } |
| | | if (grdMain.CurrentRow == null) |
| | | return; |
| | | DAL.ClsGy_BarCodeBill_Ctl oBar = new DAL.ClsGy_BarCodeBill_Ctl(); |
| | | if (MessageBox.Show("ç¡®å®è¦ä½åºæéæ¡ç ï¼", "æç¤º", MessageBoxButtons.OKCancel) == DialogResult.Cancel) |
| | | { |
| | | return; |
| | | } |
| | | for (int i = 0; i <= grdMain.SelectedRows.Count - 1; i++) |
| | | { |
| | | if (DBUtility.ClsPub.isLong(grdMain.SelectedRows[i].Cells[Fun_GetCol("HMaterID")].Value) != 0) |
| | | { |
| | | if (!oBar.Cancelltion(DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("æ¡ç ç¼å·")].Value))) |
| | | { |
| | | MessageBox.Show("ä½åºå¤±è´¥ï¼", "æç¤º"); |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | MessageBox.Show("ä½åºæåï¼", "æç¤º"); |
| | | } |
| | | |
| | | private void fzf_Click(object sender, EventArgs e) |
| | | { |
| | | //this.Sub_CheckBill(); |
| | | if (!ClsPub.Security_Log(ModRightNameDelete, 1, true, DBUtility.ClsPub.CurUserName)) |
| | | { |
| | | return; |
| | | } |
| | | if (grdMain.CurrentRow == null) |
| | | return; |
| | | DAL.ClsGy_BarCodeBill_Ctl oBar = new DAL.ClsGy_BarCodeBill_Ctl(); |
| | | if (MessageBox.Show("ç¡®å®è¦åä½åºæéæ¡ç ï¼", "æç¤º", MessageBoxButtons.OKCancel) == DialogResult.Cancel) |
| | | { |
| | | return; |
| | | } |
| | | for (int i = 0; i <= grdMain.SelectedRows.Count - 1; i++) |
| | | { |
| | | if (DBUtility.ClsPub.isLong(grdMain.SelectedRows[i].Cells[Fun_GetCol("HMaterID")].Value) != 0) |
| | | { |
| | | if (!oBar.UnCancelltion(DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("æ¡ç ç¼å·")].Value))) |
| | | { |
| | | MessageBox.Show("åä½åºå¤±è´¥ï¼", "æç¤º"); |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | MessageBox.Show("åä½åºæåï¼", "æç¤º"); |
| | | } |
| | | |
| | | private void cmdHSaveBill_Click(object sender, EventArgs e) |
| | | { |
| | | |
| | |
| | | int LSHlen = 6; //æµæ°´å·é¿åº¦ |
| | | string TM = ""; //æ¡ç |
| | | |
| | | HDate = DateTime.Now.ToShortDateString(); |
| | | HDate = dtpHBeginDate.Value.ToShortDateString(); |
| | | HYear = ClsPub.isDate(HDate).Year.ToString().Substring(2, 2); |
| | | HPeriod = "0" + ClsPub.isDate(HDate).Month.ToString(); |
| | | HPeriod = HPeriod.Substring(HPeriod.Length - 2, 2); |
| | |
| | | { |
| | | HZXQty = HZXQty - DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells["çäº§è®¢åæ°é"].Value); |
| | | grdMain.Rows[i].Cells["æ¬æ¬¡æ°é"].Value = DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells["çäº§è®¢åæ°é"].Value); |
| | | |
| | | //MessageBox.Show("请ç¹å»è¶
é¢ç产æé®çææ¡ç ï¼"); |
| | | //return; |
| | | } |
| | | else |
| | | { |
| | | grdMain.Rows[i].Cells["æ¬æ¬¡æ°é"].Value = HZXQty; |
| | | break; |
| | | // |
| | | |
| | | //HZXQty = HZXQty - DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells["çäº§è®¢åæ°é"].Value); |
| | | //grdMain.Rows[i].Cells["æ¬æ¬¡æ°é"].Value = DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells["çäº§è®¢åæ°é"].Value); |
| | | } |
| | | } |
| | | else |
| | |
| | | private void cmdHSourceID_Click(object sender, EventArgs e) |
| | | { |
| | | Int64 HEmpID = 0; |
| | | HEmpID = ClsPub.isLong(txtHEmpID.Tag); |
| | | string HEmpName = ""; |
| | | HEmpName = ClsPub.isStrNull(txtHEmpID.Text); |
| | | HEmpID = Convert.ToInt64(txtHEmpID.Tag); |
| | | |
| | | |
| | | //MessageBox.Show(ClsPub.isStrNull(HEmpID)); |
| | | //string HEmpName = ""; |
| | | //HEmpName = ClsPub.isStrNull(txtHEmpID.Text); |
| | | |
| | | DAL.ClsGy_Source_View oSource = new DAL.ClsGy_Source_View(); |
| | | if (HEmpName != "") |
| | | if (HEmpID != 0) |
| | | { |
| | | if (oSource.GetInfoByID(HEmpID)) |
| | | if (oSource.GetInfoByID_AoBang(HEmpID)) |
| | | { |
| | | this.txtHSourceID.Text = oSource.oModel.HName; |
| | | this.txtHSourceID.Tag = oSource.oModel.HItemID.ToString(); |
| | |
| | | grdList.DataSource = null; |
| | | grdSub.DataSource = null; |
| | | grdMain.DataSource = null; |
| | | txtHEmpID.Tag = 0; |
| | | } |
| | | |
| | | private void button2_Click(object sender, EventArgs e) |