Exemplo n.º 1
0
        private string CollectionSelect(string username, string strdate)
        {
            Common cm = new Common();
            dailycollection_Prop dailycollectionprop = new dailycollection_Prop();

            dailycollectionprop.UserName = username;
            dailycollectionprop.CDate    = cm.MMDDYYYY(strdate);
            dailycollection_bal dailycollectionbal = new dailycollection_bal();
            DataTable           dt = dailycollectionbal.DailyCollectionSelect(dailycollectionprop);
            string strMsg          = "";

            if (dailycollectionbal.ErrMessage != "" && dailycollectionbal.ErrMessage != null)
            {
                return(dailycollectionbal.ErrMessage);
            }
            else
            {
                if (dt.Rows.Count > 0)
                {
                    strMsg = dt.Rows[0]["ThosandNotes"].ToString() + "#" + dt.Rows[0]["FiveHundredNotes"].ToString() + "#" + dt.Rows[0]["HundredNotes"].ToString() + "#" + dt.Rows[0]["FiftyNote"].ToString() + "#" + dt.Rows[0]["TwentyNotes"].ToString() + "#" + dt.Rows[0]["TenNotes"].ToString() + "#" + dt.Rows[0]["FiveNotes"].ToString() + "#" + dt.Rows[0]["TwoNotes"].ToString() + "#" + dt.Rows[0]["OneNotes"].ToString();
                }
                else
                {
                    return("No Record Found");
                }
            }
            return(strMsg);
        }
Exemplo n.º 2
0
        private string DailyCollectionInsert(double OneThousand, double FiveHundred, double ConHundred, double fifty, double twenty, double Ten, double Five, double Two, double One, string username, string cdate, double cashAmt, double chequeAmt)
        {
            dailycollection_Prop dailycollectionprop = new dailycollection_Prop();
            Common cm = new Common();

            dailycollectionprop.ThosandNotes     = OneThousand;
            dailycollectionprop.FiveHundredNotes = FiveHundred;
            dailycollectionprop.HundredNotes     = ConHundred;
            dailycollectionprop.FiftyNote        = fifty;
            dailycollectionprop.TwentyNotes      = twenty;
            dailycollectionprop.TenNotes         = Ten;
            dailycollectionprop.FiveNotes        = Five;
            dailycollectionprop.TwoNotes         = Two;
            dailycollectionprop.OneNotes         = One;
            dailycollectionprop.UserName         = username;
            dailycollectionprop.CDate            = cdate;
            dailycollectionprop.CashAmt          = cashAmt;
            dailycollectionprop.ChequeAmt        = chequeAmt;

            string strMsg = "";
            dailycollection_bal dailycollectionbal = new dailycollection_bal();

            strMsg = dailycollectionbal.DailyCollectionInsert(dailycollectionprop);
            if (dailycollectionbal.ErrMessage != "" && dailycollectionbal.ErrMessage != null)
            {
                return(dailycollectionbal.ErrMessage);
            }
            else
            {
                return(strMsg);
            }
        }
Exemplo n.º 3
0
        private string CashAmountSelect(string username)
        {
            dailycollection_Prop dailycollectionprop = new dailycollection_Prop();

            dailycollectionprop.UserName = username;

            dailycollection_bal dailycollectionbal = new dailycollection_bal();

            DataTable dt     = dailycollectionbal.DailyCashSelect(dailycollectionprop);
            string    strMsg = "";

            if (dailycollectionbal.ErrMessage != "" && dailycollectionbal.ErrMessage != null)
            {
                return(dailycollectionbal.ErrMessage);
            }
            else
            {
                if (dt.Rows.Count > 0)
                {
                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        strMsg += dt.Rows[i]["Mode"].ToString() + "#" + dt.Rows[i]["Amount"].ToString() + "~";
                    }
                }
                else
                {
                    return("No Record Found");
                }
            }
            return(strMsg);
        }
Exemplo n.º 4
0
        private string DailyCollectionDetails(string cdateDailyCollection, string username)
        {
            dailycollection_Prop dailycollectionprop = new dailycollection_Prop();

            dailycollectionprop.CDate    = cdateDailyCollection;
            dailycollectionprop.UserName = username;

            dailycollection_bal dailycollectionbal = new dailycollection_bal();

            DataSet ds     = dailycollectionbal.DailyCollectionDetails(dailycollectionprop);
            string  strMsg = "";

            if (dailycollectionbal.ErrMessage != "" && dailycollectionbal.ErrMessage != null)
            {
                return(dailycollectionbal.ErrMessage);
            }
            else
            {
                if (ds.Tables[0].Rows.Count > 0)
                {
                    for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                    {
                        strMsg += ds.Tables[0].Rows[i][0].ToString() + "#" + ds.Tables[0].Rows[i][1].ToString() + "#";
                    }

                    if (ds.Tables[1].Rows.Count > 0)
                    {
                        for (int i = 0; i < ds.Tables[1].Rows.Count; i++)
                        {
                            strMsg += ds.Tables[1].Rows[i]["ThosandNotes"].ToString() + "#" + ds.Tables[1].Rows[i]["FiveHundredNotes"].ToString() + "#" + ds.Tables[1].Rows[i]["HundredNotes"].ToString() + "#" + ds.Tables[1].Rows[i]["FiftyNote"].ToString() + "#" + ds.Tables[1].Rows[i]["TwentyNotes"].ToString() + "#" + ds.Tables[1].Rows[i]["TenNotes"].ToString() + "#" + ds.Tables[1].Rows[i]["FiveNotes"].ToString() + "#" + ds.Tables[1].Rows[i]["TwoNotes"].ToString() + "#" + ds.Tables[1].Rows[i]["OneNotes"].ToString() + "#" + ds.Tables[1].Rows[i]["Amount"].ToString();
                        }
                    }
                }
                else
                {
                    return("No Record Found");
                }
            }
            return(strMsg);
        }