Beispiel #1
0
 private void TxtE_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         TxtNotes.Focus();
     }
 }
        private void txtBarCode_TextChanged(object sender, EventArgs e)
        {
            try
            {
                if (txtBarCode.Text != string.Empty)
                {
                    DataTable dt = new DataTable();
                    dt = ClsRet.GatBarCode(txtBarCode.Text);

                    if (dt.Rows.Count > 0)
                    {
                        TxtItemId.Text         = dt.Rows[0][0].ToString();
                        txtOrderId.Text        = dt.Rows[0][1].ToString();
                        txtBarCode.Text        = dt.Rows[0][2].ToString();
                        TxtIReturnName.Text    = dt.Rows[0][3].ToString();
                        TxtReturnPrice.Text    = dt.Rows[0][4].ToString();
                        TxtReturnQTE.Text      = dt.Rows[0][5].ToString();
                        TxtReturnDiscount.Text = dt.Rows[0][6].ToString();
                        TxtAmount.Text         = dt.Rows[0][7].ToString();
                        TxtReturnTotal.Text    = dt.Rows[0][8].ToString();
                        TxtNotes.Focus();
                    }
                }
                //else
                //{
                //    return;
                //}
            }
            catch
            {
                return;
            }
        }
 private void BtnOrderList_Click(object sender, EventArgs e)
 {
     PL.Return.FrmSelectListSales frm = new PL.Return.FrmSelectListSales();
     frm.ShowDialog();
     try
     {
         TxtItemId.Text         = frm.DGV_Order.CurrentRow.Cells[0].Value.ToString();
         txtOrderId.Text        = frm.DGV_Order.CurrentRow.Cells[1].Value.ToString();
         txtBarCode.Text        = frm.DGV_Order.CurrentRow.Cells[2].Value.ToString();
         TxtIReturnName.Text    = frm.DGV_Order.CurrentRow.Cells[3].Value.ToString();
         TxtReturnPrice.Text    = frm.DGV_Order.CurrentRow.Cells[4].Value.ToString();
         TxtReturnQTE.Text      = frm.DGV_Order.CurrentRow.Cells[5].Value.ToString();
         TxtReturnDiscount.Text = frm.DGV_Order.CurrentRow.Cells[6].Value.ToString();
         TxtAmount.Text         = frm.DGV_Order.CurrentRow.Cells[7].Value.ToString();
         TxtReturnTotal.Text    = frm.DGV_Order.CurrentRow.Cells[8].Value.ToString();
         TxtAmounTAR.Text       = frm.DGV_Order.CurrentRow.Cells[9].Value.ToString();
         CalculateDisCount();
         CalculateAmount();
         TxtNotes.Focus();
     }
     catch
     {
         return;
     }
 }
Beispiel #4
0
        public FrmEditShowItem(ArtShowItem item, int artistAttendingID = -1)
        {
            InitializeComponent();
            TxtNotes.SetWatermark("Optional");
            TxtBid.SetWatermark("NFS If Blank");
            TxtPrintMax.SetWatermark("Optional");

            ShowItem = item ?? new ArtShowItem();
            if (artistAttendingID > -1)
            {
                ShowItem.ArtistAttendingID = artistAttendingID;
            }
            if (item == null)
            {
                return;
            }

            LblShowNumber.Text = ShowItem.ShowNumber != null?ShowItem.ShowNumber.ToString() : "TBD";

            TxtTitle.Text       = ShowItem.Title;
            ChkOriginal.Checked = ShowItem.IsOriginal;
            TxtMedia.Text       = ShowItem.Media;
            TxtPrintNum.Text    = ShowItem.PrintNumber ?? "";
            TxtPrintMax.Text    = ShowItem.PrintMaxNumber ?? "";
            TxtBid.Text         = ShowItem.MinimumBid != null?ShowItem.MinimumBid.ToString() : "";

            TxtNotes.Text             = ShowItem.Notes ?? "";
            TxtLocation.Text          = ShowItem.LocationCode ?? "";
            CmbCategory.SelectedIndex = ShowItem.Category != null?CmbCategory.FindString(ShowItem.Category) : 0;
        }
        public FrmEditShopItem(PrintShopItem item, int artistAttendingID = -1)
        {
            InitializeComponent();
            TxtNotes.SetWatermark("Optional");
            TxtPrice.SetWatermark("NFS If Blank");

            ShopItem = item ?? new PrintShopItem();
            if (artistAttendingID > -1)
            {
                ShopItem.ArtistAttendingID = artistAttendingID;
            }
            if (item == null)
            {
                return;
            }

            LblShowNumber.Text = ShopItem.ShowNumber != null?ShopItem.ShowNumber.ToString() : "TBD";

            TxtTitle.Text             = ShopItem.Title;
            TxtMedia.Text             = ShopItem.Media;
            NumQuantitySent.Value     = ShopItem.QuantitySent;
            TxtPrice.Text             = ShopItem.Price.ToString();
            TxtNotes.Text             = ShopItem.Notes ?? "";
            TxtLocation.Text          = ShopItem.LocationCode ?? "";
            CmbCategory.SelectedIndex = ShopItem.Category != null?CmbCategory.FindString(ShopItem.Category) : 0;
        }
 private void ImportData()
 {
     //Retreive document details from database
     try
     {
         using (var dc = new DBAuditDataContext())
         {
             if (ComboDocNo.SelectedIndex != -1 && ComboName.SelectedIndex != -1)
             {
                 DateTime?varDatePay     = null;
                 int?     intLocationId  = null;
                 string   strLocation    = null;
                 string   strDestination = null;
                 string   strPeriod      = null;
                 decimal? doubleTrans    = null;
                 decimal? doubleTravel   = null;
                 string   strNotes       = null;
                 dc.ProSelectTransFee(ComboDocNo.SelectedValue.ToString(), ref varDatePay, ref intLocationId,
                                      int.Parse(ComboName.SelectedValue.ToString()), ref strDestination, ref strPeriod,
                                      ref doubleTrans, ref doubleTravel, ref strNotes);
                 if (varDatePay != null)
                 {
                     DatePay.Value = varDatePay.Value;
                 }
                 dc.ProGetLocationByID(intLocationId, ref strLocation);
                 ComboLocation.Text  = strLocation;
                 TxtDestination.Text = strDestination;
                 TxtPeriod.Text      = strPeriod;
                 TxtTrans.Text       = doubleTrans.ToString();
                 TxtTravel.Text      = doubleTravel.ToString();
                 TxtNotes.Text       = strNotes;
             }
             else
             {
                 DatePay.Text = null;
                 ComboLocation.SelectedIndex = -1;
                 TxtDestination.Clear();
                 TxtPeriod.Clear();
                 TxtTrans.Clear();
                 TxtTravel.Clear();
                 TxtNotes.Clear();
             }
         }
     }
     catch (InvalidOperationException)
     {
         DatePay.Value       = DateTime.Now;
         ComboLocation.Text  = "";
         TxtDestination.Text = "";
         TxtPeriod.Text      = "";
         TxtTrans.Text       = "";
         TxtTravel.Text      = "";
         TxtNotes.Text       = "";
         BtnDelete.Enabled   = false;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
        internal void EditApplication()
        {
            try
            {
                LnqEdit.Click();
                //validate page navigation
                bool bPage = Driver.driver.PageSource.Contains("Edit Rental Appliaction");
                if (bPage)
                {
                    Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Pass, "Navigated to Edit Rental Application Page");
                }

                else
                {
                    Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Fail, "Page details not verified");
                }

                ExcelLib.PopulateInCollection(Base.ExcelPath, "TenantDetails");
                //Verify if the Tenant Count field is enalbled
                bool bEnableField = TxtNoOfTenant.Enabled;
                if (bEnableField)
                {
                    TxtNoOfTenant.SendKeys(ExcelLib.ReadData(2, "NoOfTenants"));
                }
                else
                {
                    Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Fail, "Tenant Count Field not enabled");
                }
                bool bEnableNote = TxtNotes.Enabled;
                if (bEnableNote)
                {
                    TxtNotes.SendKeys(ExcelLib.ReadData(2, "Notes"));
                    Driver.wait(2);
                    BtnSave.Submit();
                    //validate the success message??
                }
                else
                {
                    Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Fail, "Notes field not enabled");
                }
            }
            catch (Exception Ex)
            { string exceptionMsg = Ex.Message; }
        }
 private void ImportData()
 {
     try
     {
         //Loading data into the form:
         using (DBAuditDataContext dc = new DBAuditDataContext())
         {
             if (ComboName.Text != "")
             {
                 string strName  = null;
                 string strNotes = null;
                 dc.ProSelectContractor(int.Parse(ComboName.SelectedValue.ToString()), ref strName,
                                        ref strNotes);
                 TxtName.Text  = strName;
                 TxtNotes.Text = strNotes;
             }
             else
             {
                 TxtName.Clear();
                 TxtNotes.Clear();
             }
         }
     }
     catch (NullReferenceException)
     {
     }
     catch (InvalidOperationException)
     {
         TxtName.Clear();
         TxtNotes.Clear();
         BtnDelete.Enabled = false;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }