Exemple #1
0
        private string PopulateCounter()
        {
            counter_Prop counterprop = new counter_Prop();

            counterprop.CounterName = "";
            counter_bal counterbal = new counter_bal();
            DataTable   dt         = counterbal.CounterSearch(counterprop);

            if (counterbal.ErrMessage != "" && counterbal.ErrMessage != null)
            {
                return("0#" + counterbal.ErrMessage + "$");
            }
            else
            {
                if (dt.Rows.Count > 0)
                {
                    StringBuilder sb = new StringBuilder();
                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        sb.Append(dt.Rows[i]["counterid"].ToString() + "#" + dt.Rows[i]["countername"].ToString() + "$");
                    }
                    return(sb.ToString());
                }
                else
                {
                    return("0#No Data Found$");
                }
            }
        }
Exemple #2
0
        private string CounterDelete(string id)
        {
            counter_Prop counterprop = new counter_Prop();

            counterprop.Counterid = Convert.ToInt32(id);
            counter_bal counterbal = new counter_bal();
            string      strMsg     = counterbal.CounterDelete(counterprop);

            return(strMsg);
        }
Exemple #3
0
        private string CounterInsert(string CounterName, string Address, string Contactperson, string ContactNumber)
        {
            counter_Prop counterprop = new counter_Prop();

            counterprop.CounterName   = CounterName;
            counterprop.Address       = Address;
            counterprop.ContactPerson = Contactperson;
            counterprop.ContactNo     = ContactNumber;
            counter_bal counterbal = new counter_bal();
            string      strMsg     = counterbal.CounterInsert(counterprop);

            return(strMsg);
        }
Exemple #4
0
        private string CounterUpdate(string idCounter, string CounterName, string Address, string Contactperson, string ContactNumber)
        {
            counter_Prop counterprop = new counter_Prop();

            counterprop.Counterid     = Convert.ToInt16(idCounter);
            counterprop.CounterName   = CounterName;
            counterprop.Address       = Address;
            counterprop.ContactPerson = Contactperson;
            counterprop.ContactNo     = ContactNumber;

            counter_bal counterbal = new counter_bal();
            string      strMsg     = counterbal.CounterUpdate(counterprop);

            return(strMsg);
        }
Exemple #5
0
        private string CounterEdit(string id)
        {
            counter_Prop counterprop = new counter_Prop();

            counterprop.Counterid = Convert.ToInt32(id);
            counter_bal counterbal = new counter_bal();
            DataTable   dt         = counterbal.CounterSelect(counterprop);
            string      strMsg     = "";

            if (dt.Rows.Count > 0)
            {
                strMsg = dt.Rows[0]["CounterName"].ToString() + "#" + dt.Rows[0]["Address"].ToString() + "#" + dt.Rows[0]["ContactPerson"].ToString() + "#" + dt.Rows[0]["ContactNo"].ToString();
            }

            return(strMsg);
        }
Exemple #6
0
        private string CounterSearch(string countername)
        {
            counter_Prop counterprop = new counter_Prop();

            counterprop.CounterName = countername;

            counter_bal CounterBal = new counter_bal();
            DataTable   dt         = CounterBal.CounterSearch(counterprop);


            StringBuilder sb = new StringBuilder();

            if (CounterBal.ErrMessage != "" && CounterBal.ErrMessage != null)
            {
                { sb.Append("<tr><td>" + CounterBal.ErrMessage + "</td><td></td><td></td><td></td><td></td><td></td></tr>"); }
            }

            else
            {
                if (dt.Rows.Count > 0)
                {
                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        sb.Append("<tr>");
                        sb.Append("<td>" + dt.Rows[i]["CounterID"].ToString() + "</td>");
                        sb.Append("<td>" + dt.Rows[i]["CounterName"].ToString() + "</td>");
                        sb.Append("<td>" + dt.Rows[i]["Address"].ToString() + "</td>");
                        sb.Append("<td>" + dt.Rows[i]["ContactPerson"].ToString() + "</td>");
                        sb.Append("<td>" + dt.Rows[i]["ContactNo"].ToString() + "</td>");
                        sb.Append("<td ><img src='images/editrec.png' alt='block' onclick='EditRecord(" + dt.Rows[i]["CounterID"].ToString() + ")'>");
                        sb.Append("<img src='images/icon_delete.png' alt='reset' onclick='DeleteRecord(" + dt.Rows[i]["CounterID"].ToString() + ")'></td>");
                        sb.Append("</tr>");
                    }
                }
                else
                {
                    sb.Append("<tr><td>No Record Found</td><td></td><td></td><td></td><td></td><td></td></tr>");
                }
            }


            return(sb.ToString());
        }
Exemple #7
0
        private string filluser(int CounterId)
        {
            counter_Prop counterProp = new counter_Prop();

            counterProp.Counterid = CounterId;
            report_bal reportbal = new report_bal();
            DataTable  dt        = reportbal.fillUser(counterProp);



            StringBuilder sb = new StringBuilder();

            if (reportbal.ErrMessage != "" && reportbal.ErrMessage != null)
            {
                return("0#" + reportbal.ErrMessage + "$");
            }
            else
            {
                if (dt.Rows.Count > 0)
                {
                    StringBuilder sbtxt = new StringBuilder();
                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        sbtxt.Append(dt.Rows[i]["UserID"].ToString() + "#" + dt.Rows[i]["UserName"].ToString() + "$");
                    }
                    return(sbtxt.ToString());
                }
                else
                {
                    return("0#No Data Found$");
                }
            }


            return(sb.ToString());
        }