コード例 #1
0
 private void ListDocument(int opt)
 {
     try
     {
         grdList.Rows.Clear();
         MaterialDeliveryDetailDB dbrecord  = new MaterialDeliveryDetailDB();
         List <materialdelivery>  Documents = dbrecord.getFilteredMaterialdetail(opt);
         foreach (materialdelivery doc in Documents)
         {
             grdList.Rows.Add();
             grdList.Rows[grdList.RowCount - 1].Cells["gDeliveryDocumentType"].Value = doc.DocumentType;
             grdList.Rows[grdList.RowCount - 1].Cells["gDocumentNo"].Value           = doc.DocumentNo;
             grdList.Rows[grdList.RowCount - 1].Cells["gDocumentDate"].Value         = doc.DocumentDate;
             grdList.Rows[grdList.RowCount - 1].Cells["gConsignee"].Value            = doc.consignee;
             grdList.Rows[grdList.RowCount - 1].Cells["gCourierID"].Value            = doc.courierID;
             grdList.Rows[grdList.RowCount - 1].Cells["gTransportationMode"].Value   = doc.transportationMode;
             grdList.Rows[grdList.RowCount - 1].Cells["gLRNo"].Value           = doc.LRNo;
             grdList.Rows[grdList.RowCount - 1].Cells["gLRDate"].Value         = doc.LRDate;
             grdList.Rows[grdList.RowCount - 1].Cells["gDeliveryDate"].Value   = doc.DeliveryDate;
             grdList.Rows[grdList.RowCount - 1].Cells["gRemarks"].Value        = doc.Remarks;
             grdList.Rows[grdList.RowCount - 1].Cells["gStatus"].Value         = doc.status;
             grdList.Rows[grdList.RowCount - 1].Cells["gCreateTime"].Value     = doc.CreateTime;
             grdList.Rows[grdList.RowCount - 1].Cells["gCreateUser"].Value     = doc.CreateUser;
             grdList.Rows[grdList.RowCount - 1].Cells["gDeliveryStatus"].Value = setStatus(doc.DeliveryStatus);
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(this.ToString() + "-" + System.Reflection.MethodBase.GetCurrentMethod().Name + "() : Error");
     }
     enableBottomButtons();
     pnlDocumentList.Visible = true;
 }
コード例 #2
0
 private void ListFilteredMaterialDeliveryDetail(int option)
 {
     try
     {
         grdList.Rows.Clear();
         MaterialDeliveryDetailDB MaterialDetDB = new MaterialDeliveryDetailDB();
         List <materialdelivery>  materialdel   = MaterialDetDB.getFilteredMaterialdetail(option);
         if (option == 1)
         {
             lblActionHeader.Text = "List of Action Pending Documents";
         }
         else if (option == 2)
         {
             lblActionHeader.Text = "Finalized";
         }
         foreach (materialdelivery mdd in materialdel)
         {
             grdList.Rows.Add();
             grdList.Rows[grdList.RowCount - 1].Cells["gDocumentType"].Value      = mdd.DocumentType;
             grdList.Rows[grdList.RowCount - 1].Cells["gDocumentNo"].Value        = mdd.DocumentNo;
             grdList.Rows[grdList.RowCount - 1].Cells["gDocumentDate"].Value      = mdd.DocumentDate;
             grdList.Rows[grdList.RowCount - 1].Cells["gConsignee"].Value         = mdd.consignee;
             grdList.Rows[grdList.RowCount - 1].Cells["gCourierID"].Value         = mdd.courierID;
             grdList.Rows[grdList.RowCount - 1].Cells["gTransportaionMode"].Value = mdd.transportationMode;
             grdList.Rows[grdList.RowCount - 1].Cells["gLRNo"].Value           = mdd.LRNo;
             grdList.Rows[grdList.RowCount - 1].Cells["gLRDate"].Value         = mdd.LRDate;
             grdList.Rows[grdList.RowCount - 1].Cells["gRemarks"].Value        = mdd.Remarks;
             grdList.Rows[grdList.RowCount - 1].Cells["gStatus"].Value         = mdd.status;
             grdList.Rows[grdList.RowCount - 1].Cells["gCreateTime"].Value     = mdd.CreateTime;
             grdList.Rows[grdList.RowCount - 1].Cells["gCreateUser"].Value     = mdd.CreateUser;
             grdList.Rows[grdList.RowCount - 1].Cells["gDeliveryStatus"].Value = setStatus(mdd.DeliveryStatus);
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("Error in Maerial Delivery Listing");
     }
     setButtonVisibility("init");
     pnlList.Visible = true;
 }