Esempio n. 1
0
    protected void AddTextBox(int id)
    {
        DataSet ds;

        if (Session["FeeType"].ToString() == "2")
        {
            ds = BLL_Crew_Disbursement.Get_MOProcessingFee(id);
        }
        else
        {
            ds = BLL_Crew_Disbursement.Get_MOAgencyFee(id);
        }
        DataTable dt = ds.Tables[0];

        foreach (DataColumn column in dt.Columns)
        {
            string sColumName = "";
            if (column.ColumnName.Contains("Amt"))
            {
                sColumName = column.ColumnName.Replace("Amt", "").TrimEnd().Replace(" ", "_") + "_ID";
            }
            if (column.ColumnName.Contains("Amt") || column.ColumnName.Contains("Date") || column.ColumnName.Contains("DATE"))
            {
                Literal lts = new Literal();
                lts.Text = "<table>";
                pnlTextBoxes.Controls.Add(lts);
                this.CreateTextBox("txt" + column.ColumnName, column.ColumnName, Convert.ToString(dt.Rows[0][column.ColumnName]), column.ColumnName.Contains("Amt") ? Convert.ToString(dt.Rows[0][sColumName]) : ""); //Convert.ToString(dt.Rows[0].Field<string>(0))
                Literal lts1 = new Literal();
                lts1.Text = "</table>";
                pnlTextBoxes.Controls.Add(lts1);
            }
        }
        ViewState["Flag"] = pnlTextBoxes.Controls.Count;
    }
Esempio n. 2
0
    protected void Load_ProcessingFee()
    {
        try
        {
            DataSet ds = BLL_Crew_Disbursement.Get_MOProcessingFee(0);

            foreach (DataRow dr in ds.Tables[0].Rows)
            {
                dr[4]  = Convert.ToString(dr[4]) != "" ? UDFLib.ConvertUserDateFormat(Convert.ToString(dr[4])) : "";
                dr[7]  = dr[7] != "" ? UDFLib.ConvertUserDateFormat(Convert.ToString(dr[7])) : "";
                dr[10] = dr[10] != "" ? UDFLib.ConvertUserDateFormat(Convert.ToString(dr[10])) : "";
                dr[13] = dr[13] != "" ? UDFLib.ConvertUserDateFormat(Convert.ToString(dr[13])) : "";
                dr[16] = dr[16] != "" ? UDFLib.ConvertUserDateFormat(Convert.ToString(dr[16])) : "";
                dr[19] = dr[19] != "" ? UDFLib.ConvertUserDateFormat(Convert.ToString(dr[19])) : "";
                dr[22] = dr[22] != "" ? UDFLib.ConvertUserDateFormat(Convert.ToString(dr[22])) : "";
                dr[25] = dr[25] != "" ? UDFLib.ConvertUserDateFormat(Convert.ToString(dr[25])) : "";
                dr[28] = dr[28] != "" ? UDFLib.ConvertUserDateFormat(Convert.ToString(dr[28])) : "";
                dr[31] = dr[31] != "" ? UDFLib.ConvertUserDateFormat(Convert.ToString(dr[31])) : "";
                dr[34] = dr[34] != "" ? UDFLib.ConvertUserDateFormat(Convert.ToString(dr[34])) : "";
                dr[37] = dr[37] != "" ? UDFLib.ConvertUserDateFormat(Convert.ToString(dr[37])) : "";
                dr[40] = dr[40] != "" ? UDFLib.ConvertUserDateFormat(Convert.ToString(dr[40])) : "";
                dr[43] = dr[43] != "" ? UDFLib.ConvertUserDateFormat(Convert.ToString(dr[43])) : "";
                dr[46] = dr[46] != "" ? UDFLib.ConvertUserDateFormat(Convert.ToString(dr[46])) : "";
                dr[49] = dr[49] != "" ? UDFLib.ConvertUserDateFormat(Convert.ToString(dr[49])) : "";
                dr[52] = dr[52] != "" ? UDFLib.ConvertUserDateFormat(Convert.ToString(dr[52])) : "";
                dr[55] = dr[55] != "" ? UDFLib.ConvertUserDateFormat(Convert.ToString(dr[55])) : "";
                dr[58] = dr[58] != "" ? UDFLib.ConvertUserDateFormat(Convert.ToString(dr[58])) : "";
            }

            GridView_ProcessingFee.DataSource = ds.Tables[0];
            GridView_ProcessingFee.DataBind();

            gv_ProcessingFeeHistory.DataSource = ds.Tables[1];
            gv_ProcessingFeeHistory.DataBind();
        }
        catch
        {
        }
    }