コード例 #1
0
ファイル: CB_001.cs プロジェクト: markup007/Roys
 private void AmountToWords(double amt)
 {
     try
     {
         CnvToCurncy obj = new CnvToCurncy();
         this.lbl_amtwrd.Text = obj.get(amt);
     }
     catch (Exception ex)
     {
     }
 }
コード例 #2
0
        private void GetRateInWords()
        {
            try
            {
                CnvToCurncy obj = new CnvToCurncy();

                this.lbl_amtwrd.Text = obj.get(PLABS.Utils.CnvToDouble(this.txt_rate.Text));
            }
            catch (Exception ex)
            {
            }
        }
コード例 #3
0
ファイル: FL_003.cs プロジェクト: markup007/Roys
        private void CellEnter()
        {
            try
            {
                double payment = PLABS.Utils.CnvToDouble(this.grd_data.CurrentRow.Cells["txt_cramt"].Value);
                double receipt = PLABS.Utils.CnvToDouble(this.grd_data.CurrentRow.Cells["txt_dramt_gv"].Value);

                CnvToCurncy obj = new CnvToCurncy();

                this.lbl_amtwrd.Text = obj.get(Math.Abs(payment - receipt));
            }
            catch (Exception ex)
            {
            }
        }
コード例 #4
0
ファイル: TR_004.cs プロジェクト: markup007/Roys
        //private void RefreshClick()
        //{
        //    try
        //    {
        //        this.fnd_item_id.ClearControl(true);
        //        DataSet ds = this.GetDataSet("RI", "", "", "", "");
        //        this.fnd_item_id.LoadData(PLABS.Utils.GetDataTable(ds, 0), "itm_name", "purty", "itm_id");
        //    }
        //    catch (Exception ex)
        //    {
        //        throw (ex);
        //    }
        //}
        private void calLables()
        {
            double    grssWt = 0, netWt = 0, smithWt = 0, McWt = 0, TotWt = 0, McTot = 0, StneCsh = 0;
            double    MCVal = 0, ttlMcRt = 0;
            DataTable dt = (DataTable)(grd_data.DataSource);

            if (dt.Rows.Count > 0)
            {
                Hashtable ht = Utils.sumofdt(dt);

                //  object netWt1 = dt.Compute("Sum(stne_wgt)", "stne_lss like '"+ "1" + "'");
                smithWt = PLABS.Utils.CnvToDouble(ht["smthWt"]);
                TotWt   = PLABS.Utils.CnvToDouble(ht["tot_Wt"]);
                McTot   = PLABS.Utils.CnvToDouble(ht["mc_tot"]);
                StneCsh = PLABS.Utils.CnvToDouble(ht["stne_csh"]);
                McWt    = TotWt - smithWt;
                MCVal   = PLABS.Utils.CnvToDouble(McTot - McWt);
                ttlMcRt = PLABS.Utils.CnvToDouble(ht["mc_rate"]);

                this.txt_grssWt.Text  = PLABS.Utils.CnvToDouble(ht["grss_wght"]).ToString("F3");
                this.txt_netWt.Text   = PLABS.Utils.CnvToDouble(ht["net_wt"]).ToString("F3");
                this.txt_smthWt.Text  = smithWt.ToString("F3");
                this.txt_totWt.Text   = TotWt.ToString("F3");
                this.txt_mcGrm.Text   = McWt.ToString("F3");
                this.txt_mcAmt.Text   = MCVal.ToString("F2");
                this.txt_StneCsh.Text = StneCsh.ToString("F2");
                this.txtTtlMcRt.Text  = ttlMcRt.ToString("F2");

                this.OpeningUpdataion();
            }
            else
            {
                this.txt_grssWt.ClearControl(true);
                this.txt_netWt.ClearControl(true);
                this.txt_smthWt.ClearControl(true);
                this.txt_totWt.ClearControl(true);
                this.txt_mcGrm.ClearControl(true);
                this.txt_mcAmt.ClearControl(true);

                this.OpeningUpdataion();
            }
            CnvToCurncy obj = new CnvToCurncy();

            this.lbl_smtamtwrd.Text = obj.get(PLABS.Utils.CnvToDouble(this.txt_amount.Text));
            this.lbl_smtmcwrd.Text  = obj.get(PLABS.Utils.CnvToDouble(this.txt_mcAmt.Text));
        }
コード例 #5
0
ファイル: FL_002.cs プロジェクト: markup007/Roys
        void grd_data_CellEnter(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
                this.rtxt_desc.ClearControl(true);
                this.txt_wgt.ClearControl(true);
                this.txt_cash.ClearControl(true);
                this.rtxt_desc.Text = PLABS.Utils.CnvToStr(this.grd_data.CurrentRow.Cells["txt_desc_gv"].Value);
                this.txt_wgt.Text   = PLABS.Utils.CnvToDouble(this.grd_data.CurrentRow.Cells["txt_balwt_gv"].Value).ToString("F3");
                this.txt_cash.Text  = PLABS.Utils.CnvToDouble(this.grd_data.CurrentRow.Cells["txt_cashbal_gv"].Value).ToString("N2");

                CnvToCurncy obj = new CnvToCurncy();
                this.lbl_amtwrd.Text = obj.get(PLABS.Utils.CnvToDouble(this.txt_cash.Text));
            }
            catch
            {
            }
        }
コード例 #6
0
        private void calaculate()
        {
            CnvToCurncy obj  = new CnvToCurncy();
            Double      wtcs = PLABS.Utils.CnvToDouble(this.txt_cas_wt.Text);
            Double      rate = PLABS.Utils.CnvToDouble(this.txt_bord.Text);
            Double      tot  = 0.00;

            if (PLABS.Utils.CnvToInt(ddl_mode.SelectedValue) == 0)
            {
                tot = wtcs * rate;
                this.txt_conv.Text   = tot.ToString("F3");
                this.lbl_amtwrd.Text = obj.get(PLABS.Utils.CnvToDouble(this.txt_conv.Text));
            }
            else
            {
                tot = wtcs / rate;
                this.txt_conv.Text   = tot.ToString("F3");
                this.lbl_amtwrd.Text = obj.get(PLABS.Utils.CnvToDouble(this.txt_cas_wt.Text));
            }
        }
コード例 #7
0
 void txt_rate_KeyDown(object sender, KeyEventArgs e)
 {
     try
     {
         if (e.KeyCode == Keys.Enter)
         {
             double ttlrte;
             double rate = PLABS.Utils.CnvToDouble(this.txt_rate.Text);
             double wght = PLABS.Utils.CnvToDouble(this.txt_weight.Text);
             ttlrte = rate * wght;
             this.txt_ttl_rt.Text = PLABS.Utils.CnvToStr(ttlrte);
             CnvToCurncy obj = new CnvToCurncy();
             this.lbl_amtwrd.Text = obj.get(PLABS.Utils.CnvToDouble(this.txt_ttl_rt.Text));
             this.OpeningUpdation();
             this.btn_save.Focus();
         }
     }
     catch (Exception ex)
     {
     }
 }