| | |
| | | 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 * 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.isInt(DSet.Tables[0].Rows[0]["HEmpID"]); |
| | | } |
| | | else |
| | | { |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | private void grdMain_DblClick(object sender, EventArgs e) |
| | |
| | | { |
| | | if (HZXQty > DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells["çäº§è®¢åæ°é"].Value)) |
| | | { |
| | | HZXQty = HZXQty - DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells["çäº§è®¢åæ°é"].Value); |
| | | grdMain.Rows[i].Cells["æ¬æ¬¡æ°é"].Value = DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells["çäº§è®¢åæ°é"].Value); |
| | | //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; |
| | | //grdMain.Rows[i].Cells["æ¬æ¬¡æ°é"].Value = HZXQty; |
| | | // |
| | | |
| | | HZXQty = HZXQty - DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells["çäº§è®¢åæ°é"].Value); |
| | | grdMain.Rows[i].Cells["æ¬æ¬¡æ°é"].Value = DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells["çäº§è®¢åæ°é"].Value); |
| | | } |
| | | } |
| | | else |