Exemplo n.º 1
0
    public static string LoadRegion()
    {
        SqlConnection         Conn       = new SqlConnection(ConfigurationManager.ConnectionStrings["Con"].ConnectionString);
        DataSet               ds         = AACommon.ReturnDatasetBySPWithoutParameter("ITM_UNIT_TYPE_Get", Conn);
        List <GetRegionClass> RegionList = new List <GetRegionClass>();

        RegionList.Clear();
        if (ds.Tables[0].Rows.Count > 0)
        {
            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                GetRegionClass dbdc = new GetRegionClass();

                dbdc.UnitTypeID   = ds.Tables[0].Rows[i][0].ToString();
                dbdc.UnitTypeDesc = ds.Tables[0].Rows[i][1].ToString();
                RegionList.Insert(i, dbdc);
            }
        }


        JavaScriptSerializer jser = new JavaScriptSerializer();


        return(jser.Serialize(RegionList));
    }
Exemplo n.º 2
0
    public static string LoadRegion()
    {
        SqlConnection         Conn       = new SqlConnection(ConfigurationManager.ConnectionStrings["Con"].ConnectionString);
        DataSet               ds         = AACommon.ReturnDatasetBySPWithoutParameter("Supplier_Get", Conn);
        List <GetRegionClass> RegionList = new List <GetRegionClass>();

        RegionList.Clear();
        if (ds.Tables[0].Rows.Count > 0)
        {
            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                GetRegionClass dbdc = new GetRegionClass();

                dbdc.SupplierID    = ds.Tables[0].Rows[i][0].ToString();
                dbdc.SupplierTitle = ds.Tables[0].Rows[i][1].ToString();
                dbdc.SupplierCode  = ds.Tables[0].Rows[i][2].ToString();
                dbdc.Phone         = ds.Tables[0].Rows[i][3].ToString();
                dbdc.Fax           = ds.Tables[0].Rows[i][4].ToString();
                dbdc.Email         = ds.Tables[0].Rows[i][5].ToString();
                dbdc.AddressLine1  = ds.Tables[0].Rows[i][6].ToString();
                dbdc.AddressLine2  = ds.Tables[0].Rows[i][7].ToString();
                dbdc.NTN           = ds.Tables[0].Rows[i][8].ToString();
                dbdc.GST           = ds.Tables[0].Rows[i][9].ToString();
                dbdc.SRB           = ds.Tables[0].Rows[i][10].ToString();
                dbdc.OpBal         = ds.Tables[0].Rows[i]["OpBal"].ToString();

                RegionList.Insert(i, dbdc);
            }
        }

        JavaScriptSerializer jser = new JavaScriptSerializer();


        return(jser.Serialize(RegionList));
    }
Exemplo n.º 3
0
    public static string LoadRegion()
    {
        SqlConnection           Conn       = new SqlConnection(ConfigurationManager.ConnectionStrings["Con"].ConnectionString);
        DataSet                 ds         = AACommon.ReturnDatasetBySPWithoutParameter("FORM_GET_ALL", Conn);
        List <GetDistrictClass> RegionList = new List <GetDistrictClass>();

        RegionList.Clear();
        if (ds.Tables[0].Rows.Count > 0)
        {
            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                GetDistrictClass dbdc = new GetDistrictClass();

                dbdc.ID     = ds.Tables[0].Rows[i][0].ToString();
                dbdc.Name   = ds.Tables[0].Rows[i][1].ToString();
                dbdc.Region = ds.Tables[0].Rows[i][2].ToString();
                dbdc.Path   = ds.Tables[0].Rows[i][3].ToString();
                RegionList.Insert(i, dbdc);
            }
        }


        JavaScriptSerializer jser = new JavaScriptSerializer();


        return(jser.Serialize(RegionList));
    }
Exemplo n.º 4
0
    public static string LoadRegion()
    {
        SqlConnection         Conn       = new SqlConnection(ConfigurationManager.ConnectionStrings["Con"].ConnectionString);
        DataSet               ds         = AACommon.ReturnDatasetBySPWithoutParameter("Customer_Get", Conn);
        List <GetRegionClass> RegionList = new List <GetRegionClass>();

        RegionList.Clear();
        if (ds.Tables[0].Rows.Count > 0)
        {
            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                GetRegionClass dbdc = new GetRegionClass();

                dbdc.CustomerID    = ds.Tables[0].Rows[i]["CustomerID"].ToString();
                dbdc.CustomerTitle = ds.Tables[0].Rows[i]["CustomerTitle"].ToString();
                dbdc.CustomerCode  = ds.Tables[0].Rows[i]["CustomerCode"].ToString();
                dbdc.Phone         = ds.Tables[0].Rows[i]["Phone"].ToString();
                dbdc.Fax           = ds.Tables[0].Rows[i]["Fax"].ToString();
                dbdc.Email         = ds.Tables[0].Rows[i]["Email"].ToString();
                dbdc.AddressLine1  = ds.Tables[0].Rows[i]["AddressLine1"].ToString();
                dbdc.AddressLine2  = ds.Tables[0].Rows[i]["AddressLine2"].ToString();
                dbdc.NTN           = ds.Tables[0].Rows[i]["NTN"].ToString();
                dbdc.GST           = ds.Tables[0].Rows[i]["GST"].ToString();
                dbdc.SRB           = ds.Tables[0].Rows[i]["SRB"].ToString();
                dbdc.InvoiceDays   = ds.Tables[0].Rows[i]["InvoiceDays"].ToString();
                dbdc.AgingDays     = ds.Tables[0].Rows[i]["AgingDays"].ToString();
                dbdc.OpBal         = ds.Tables[0].Rows[i]["OpBal"].ToString();

                //CellNo, Phone2, CNIC, BookingDay, DeliveryDay, CustomerTypeID
                dbdc.CellNo         = ds.Tables[0].Rows[i]["CellNo"].ToString();
                dbdc.Phone2         = ds.Tables[0].Rows[i]["Phone2"].ToString();
                dbdc.CNIC           = ds.Tables[0].Rows[i]["CNIC"].ToString();
                dbdc.BookingDay     = ds.Tables[0].Rows[i]["BookingDay"].ToString();
                dbdc.DeliveryDay    = ds.Tables[0].Rows[i]["DeliveryDay"].ToString();
                dbdc.CustomerTypeID = ds.Tables[0].Rows[i]["CustomerTypeID"].ToString();


                RegionList.Insert(i, dbdc);
            }
        }

        JavaScriptSerializer jser = new JavaScriptSerializer();


        return(jser.Serialize(RegionList));
    }
Exemplo n.º 5
0
    public static string LoadRegion()
    {
        SqlConnection         Conn       = new SqlConnection(ConfigurationManager.ConnectionStrings["Con"].ConnectionString);
        DataSet               ds         = AACommon.ReturnDatasetBySPWithoutParameter("Supplier_Get", Conn);
        List <GetRegionClass> RegionList = new List <GetRegionClass>();

        RegionList.Clear();
        if (ds.Tables[0].Rows.Count > 0)
        {
            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                GetRegionClass dbdc = new GetRegionClass();

                dbdc.SupplierID     = ds.Tables[0].Rows[i]["SupplierID"].ToString();
                dbdc.SupplierTitle  = ds.Tables[0].Rows[i]["SupplierTitle"].ToString();
                dbdc.SupplierCode   = ds.Tables[0].Rows[i]["SupplierCode"].ToString();
                dbdc.Phone          = ds.Tables[0].Rows[i]["Phone"].ToString();
                dbdc.Fax            = ds.Tables[0].Rows[i]["Fax"].ToString();
                dbdc.Email          = ds.Tables[0].Rows[i]["Email"].ToString();
                dbdc.AddressLine1   = ds.Tables[0].Rows[i]["AddressLine1"].ToString();
                dbdc.AddressLine2   = ds.Tables[0].Rows[i]["AddressLine2"].ToString();
                dbdc.NTN            = ds.Tables[0].Rows[i]["NTN"].ToString();
                dbdc.GST            = ds.Tables[0].Rows[i]["GST"].ToString();
                dbdc.SRB            = ds.Tables[0].Rows[i]["SRB"].ToString();
                dbdc.OpBal          = ds.Tables[0].Rows[i]["OpBal"].ToString();
                dbdc.Bank1Title     = ds.Tables[0].Rows[i]["Bank1Title"].ToString();
                dbdc.Bank1AccountNo = ds.Tables[0].Rows[i]["Bank1AccountNo"].ToString();
                dbdc.Bank1BankName  = ds.Tables[0].Rows[i]["Bank1BankName"].ToString();
                dbdc.Bank2Title     = ds.Tables[0].Rows[i]["Bank2Title"].ToString();
                dbdc.Bank2AccountNo = ds.Tables[0].Rows[i]["Bank2AccountNo"].ToString();
                dbdc.Bank2BankName  = ds.Tables[0].Rows[i]["Bank2BankName"].ToString();
                dbdc.Bank3Title     = ds.Tables[0].Rows[i]["Bank3Title"].ToString();
                dbdc.Bank3AccountNo = ds.Tables[0].Rows[i]["Bank3AccountNo"].ToString();
                dbdc.Bank3BankName  = ds.Tables[0].Rows[i]["Bank3BankName"].ToString();

                RegionList.Insert(i, dbdc);
            }
        }

        JavaScriptSerializer jser = new JavaScriptSerializer();


        return(jser.Serialize(RegionList));
    }
Exemplo n.º 6
0
    public static string LoadRegion()
    {
        SqlConnection            Conn       = new SqlConnection(ConfigurationManager.ConnectionStrings["Con"].ConnectionString);
        DataSet                  ds         = AACommon.ReturnDatasetBySPWithoutParameter("ITM_ITEM_GET", Conn);
        List <GetRegionClassLCK> RegionList = new List <GetRegionClassLCK>();

        RegionList.Clear();

        //if (ds.Tables[0].Rows.Count > 0)
        //{
        for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
        {
            GetRegionClassLCK dbdc = new GetRegionClassLCK();

            dbdc.ITEMID         = ds.Tables[0].Rows[i]["ITEMID"].ToString();
            dbdc.ITEMName       = ds.Tables[0].Rows[i]["ITEMName"].ToString();
            dbdc.ItemCode       = ds.Tables[0].Rows[i]["ItemCode"].ToString();
            dbdc.BarCode        = ds.Tables[0].Rows[i]["BarCode"].ToString();
            dbdc.Discription    = ds.Tables[0].Rows[i]["Discription"].ToString();
            dbdc.UnitTypeID     = ds.Tables[0].Rows[i]["UnitTypeID"].ToString();
            dbdc.DistPercentage = ds.Tables[0].Rows[i]["DistPercentage"].ToString();
            dbdc.TradePrice     = ds.Tables[0].Rows[i]["TradePrice"].ToString();
            dbdc.RetailPrice    = ds.Tables[0].Rows[i]["RetailPrice"].ToString();
            dbdc.PackingTypeID  = ds.Tables[0].Rows[i]["PackingTypeID"].ToString();
            dbdc.Wt             = ds.Tables[0].Rows[i]["Wt"].ToString();

            RegionList.Insert(i, dbdc);
        }

        //}


        JavaScriptSerializer jser = new JavaScriptSerializer();


        return(jser.Serialize(RegionList));
    }