Ejemplo n.º 1
0
 private void ListCurrencyCon_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
 {
     Administration.List.CurrencyconversionList frmList = new Administration.List.CurrencyconversionList();
     frmList.StartPosition = FormStartPosition.CenterScreen;
     Con_Id = 0;
     frmList.ShowDialog();
     FillCurrencyConversionInfo();
 }
Ejemplo n.º 2
0
        private void btnDelete_Click(object sender, EventArgs e)
        {
            bool isDelete = objConBal.DeleteCurrencyConversion(Con_Id);

            if (isDelete)
            {
                MessageBox.Show("Delete Successfully!");
                ClearFormValues();
                Con_Id = 0;
                Administration.List.CurrencyconversionList frmList = new Administration.List.CurrencyconversionList();
                frmList.StartPosition = FormStartPosition.CenterScreen;

                frmList.ShowDialog();
                FillCurrencyConversionInfo();
            }
        }
Ejemplo n.º 3
0
        private void btnUpdate_Click(object sender, EventArgs e)
        {
            CurrencyConversionModel objcurconv = new CurrencyConversionModel();

            objcurconv.Date = Convert.ToDateTime(dtDate.Text.Trim());
            CurrencyConversionDetailsModel        objCurrency;
            List <CurrencyConversionDetailsModel> lstCurrency = new List <CurrencyConversionDetailsModel>();

            for (int i = 0; i < dvgCurrencyConvDetails.DataRowCount; i++)
            {
                DataRow row = dvgCurrencyConvDetails.GetDataRow(i);

                objCurrency              = new CurrencyConversionDetailsModel();
                objCurrency.Currency     = row["Currency"].ToString();
                objCurrency.StandardRate = Convert.ToDecimal(row["TandardRate"].ToString());
                objCurrency.SellingRate  = Convert.ToDecimal(row["SellingRate"].ToString());
                objCurrency.BuyingRate   = Convert.ToDecimal(row["BuyingRate"].ToString());
                if (Con_Id != 0)
                {
                    objCurrency.id       = Convert.ToInt32(row["id"].ToString() == string.Empty?"0":row["id"].ToString());
                    objCurrency.ParentId = Convert.ToInt32(row["ParentId"].ToString() == string.Empty?"0": row["ParentId"].ToString());
                }
                lstCurrency.Add(objCurrency);
            }
            objcurconv.CurrenyDetails = lstCurrency;
            objcurconv.CcID           = Con_Id;
            bool isSuccess = objConBal.UpdateCurrencyconversion(objcurconv);

            if (isSuccess)
            {
                MessageBox.Show("Update Successfully!");
                ClearFormValues();
                Con_Id = 0;
                Administration.List.CurrencyconversionList frmList = new Administration.List.CurrencyconversionList();
                frmList.StartPosition = FormStartPosition.CenterScreen;

                frmList.ShowDialog();
                FillCurrencyConversionInfo();
            }
        }