Exemple #1
0
        private void New_Damage_Load(object sender, EventArgs e)
        {
            Purchase.database.DamageData damageData = new Purchase.database.DamageData();
            damageData.FnConn();
            DataTable dt1 = damageData.FillData("M", "", "spDamage");

            if (dt1.Rows.Count > 0)
            {
                int    slno = Convert.ToInt32(dt1.Rows[0][0].ToString()) + 1;
                string no   = slno + "";
                txtdamageno.Text = "RT-NO:" + no.PadLeft(5, '0');
            }
            dtpdate.EditValue = DateTime.Now;
            DataTable dt = new DataTable();

            dt.Columns.Add("slno", Type.GetType("System.Int32"));
            dt.Columns.Add("damageno", Type.GetType("System.String"));
            dt.Columns.Add("itemCode", Type.GetType("System.String"));
            dt.Columns.Add("itemName", Type.GetType("System.String"));
            dt.Columns.Add("brandName", Type.GetType("System.String"));
            dt.Columns.Add("category", Type.GetType("System.String"));
            dt.Columns.Add("realqty", Type.GetType("System.Double"));
            dt.Columns.Add("damageqty", Type.GetType("System.Double"));
            dt.Columns.Add("balanceqty", Type.GetType("System.Double"));
            dt.Columns.Add("po", Type.GetType("System.String"));
            dt.Columns.Add("mrr", Type.GetType("System.String"));
            dt.Columns.Add("reason", Type.GetType("System.String"));
            DataRow dr = dt.NewRow();

            dt.Rows.Add(dr);
            gridControl1.DataSource = dt;
            damageData.FnTrans();
        }
Exemple #2
0
        void loadData()
        {
            Purchase.database.DamageData damageData = new Purchase.database.DamageData();
            damageData.FnConn();
            DataTable dt = damageData.FillData("S", "", "spDamage");

            if (dt.Rows.Count > 0)
            {
                gridControl1.DataSource = dt;
            }
        }
Exemple #3
0
 private void barButtonItem2_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     try
     {
         Purchase.database.DamageData damageData = new Purchase.database.DamageData();
         damageData.FnConn();
         DataTable dt1 = damageData.FillData("M", "", "spDamage");
         damageData.FnTrans();
         if (dt1.Rows.Count > 0)
         {
             int    slno = Convert.ToInt32(dt1.Rows[0][0].ToString()) + 1;
             string no   = slno + "";
             txtdamageno.Text = "RT-NO:" + no.PadLeft(5, '0');
         }
         dtpdate.EditValue = DateTime.Now;
         txtremark.Text    = "";
         txtuserName.Text  = "";
     }
     catch (Exception ex) { }
 }
Exemple #4
0
 private void barButtonItem2_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     try
     {
         DataTable source = gridControl1.DataSource as DataTable;
         source.Clear();
         gridControl1.DataSource = source;
         dtpdate.EditValue       = DateTime.Now;
         Purchase.database.DamageData damageData = new Purchase.database.DamageData();
         damageData.FnConn();
         DataTable dt1 = damageData.FillData("M", "", "spLost");
         damageData.FnTrans();
         if (dt1.Rows.Count > 0)
         {
             int    slno = Convert.ToInt32(dt1.Rows[0][0].ToString()) + 1;
             string no   = slno + "";
             txtlostno.Text = "LS" + no.PadLeft(5, '0');
         }
         txtremark.Text = "";
         txtuser.Text   = "";
     }
     catch (Exception ex) { }
 }