Example #1
0
        private string SDOPopulate()
        {
            sdo_Prop sdoprop = new sdo_Prop();

            sdoprop.SDOCode = "";
            sdoprop.SDOName = "";
            sdo_bal       sdobal = new sdo_bal();
            DataTable     dt     = sdobal.SDOSearch(sdoprop);
            StringBuilder sb     = new StringBuilder();

            if (sdobal.ErrMessage != "" && sdobal.ErrMessage != null)
            {
                return("0#" + sdobal.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]["sdocode"].ToString().Trim() + "#" + dt.Rows[i]["sdoname"].ToString() + "$");
                    }
                    return(sbtxt.ToString());
                }
                else
                {
                    return("0#No Data Found$");
                }
            }

            return(sb.ToString());
        }
Example #2
0
        private void PopulateSDO()
        {
            sdo_Prop sdoprop = new sdo_Prop();

            sdoprop.SDOCode = "";
            sdoprop.SDOName = "";
            sdo_bal   sdobal = new sdo_bal();
            DataTable dt     = sdobal.SDOSearch(sdoprop);

            subdivision.DataSource     = dt;
            subdivision.DataValueField = "sdocode";
            subdivision.DataTextField  = "sdoname";
            subdivision.DataBind();
            subdivision.Items.Add("------Select------------");
            subdivision.SelectedValue = "------Select------------";
        }
Example #3
0
        private string SDOSearch(string sdocode, string sdoname)
        {
            sdo_Prop sdoprop = new sdo_Prop();

            sdoprop.SDOCode = sdocode;
            sdoprop.SDOName = sdoname;
            sdo_bal       sdobal = new sdo_bal();
            DataTable     dt     = sdobal.SDOSearch(sdoprop);
            StringBuilder sb     = new StringBuilder();

            if (sdobal.ErrMessage != "" && sdobal.ErrMessage != null)
            {
                sb.Append("<tr><td>" + sdobal.ErrMessage + "</td><td></td><td></td></tr>");
            }
            else
            {
                if (dt.Rows.Count <= 0)
                {
                    sb.Append("<tr><td >No Record Found</td><td></td><td></td></tr>");
                }
                else
                {
                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        sb.Append("<tr>");
                        sb.Append("<td>" + dt.Rows[i]["sdocode"].ToString() + "</td>");
                        sb.Append("<td>" + dt.Rows[i]["sdoname"].ToString() + "</td>");
                        sb.Append("<td ><img src='images/icon_delete.png' alt='delete' onclick=DeleteSDO('");
                        sb.Append(dt.Rows[i]["sdocode"].ToString().Trim());
                        sb.Append("') /></td>");
                        sb.Append("</tr>");
                    }
                }
            }

            return(sb.ToString());
        }