private void populatefees()
        {
            //--------------------------------------------------------
            panelfeesDetails1.Controls.Add(new LiteralControl("<table style='width:60%;border-collapse:collapse;'  rules='all'>"));
            panelfeesDetails1.Controls.Add(new LiteralControl("<tr class='HeaderStyle'>"));
            panelfeesDetails1.Controls.Add(new LiteralControl("<th scope='col'>"));
            panelfeesDetails1.Controls.Add(new LiteralControl(" Fees"));
            panelfeesDetails1.Controls.Add(new LiteralControl("</th>"));

            //if (courseType == 1 || courseType == 3)
            //{
            //    headerCount = 4;
            //    width = 80;
            //}
            //else
            //{
            //    headerCount = 8;
            //    width = 50;
            //}

            headerCount = 1;
            width       = 50;

            ////////CREATE HEADER .////////////////////////////
            createHeader(headerCount, width);
            panelfeesDetails1.Controls.Add(new LiteralControl("</tr>"));
            ////////END HEADER .////////////////////////////
            int    intItemCount = 0;
            string strFeesName  = "";

            BusinessLayer.Accounts.StreamGroup stremGrp  = new BusinessLayer.Accounts.StreamGroup();
            Entity.Accounts.StreamGroup        estremGrp = new Entity.Accounts.StreamGroup();

            //estremGrp.co = courseType;
            estremGrp.intMode      = 1;
            estremGrp.feesHeaderID = (ddlMembershipCategory.SelectedIndex == 0) ? 0 : Convert.ToInt32(ddlMembershipCategory.SelectedValue.Trim());
            //estremGrp.stream_type_i

            dt = new DataTable();
            dt = stremGrp.GetFeesHead(estremGrp);

            if (dt.Rows.Count > 0)
            {
                intItemCount = dt.Rows.Count;
                for (int i = 0; i < intItemCount; i++)
                {
                    strFeesName = dt.Rows[i]["fees"].ToString();
                    int item = Convert.ToInt32(dt.Rows[i]["id"].ToString());
                    panelfeesDetails1.Controls.Add(new LiteralControl("<tr class='RowStyle'>"));
                    createBody(headerCount, width, item, strFeesName, dt, i);
                    panelfeesDetails1.Controls.Add(new LiteralControl("</tr>"));
                }
            }
            panelfeesDetails1.Controls.Add(new LiteralControl("</table>"));
            ;
        }
Esempio n. 2
0
        protected void LoadFeesHead()
        {
            BusinessLayer.Accounts.StreamGroup ObjFees = new BusinessLayer.Accounts.StreamGroup();
            DataTable dt = ObjFees.GetAllFeesHead();

            ddlFeesHead.DataSource     = dt;
            ddlFeesHead.DataTextField  = "fees";
            ddlFeesHead.DataValueField = "id";
            ddlFeesHead.DataBind();
        }
Esempio n. 3
0
        protected void LoadFeesHead()
        {
            BusinessLayer.Accounts.StreamGroup obj = new BusinessLayer.Accounts.StreamGroup();

            DataTable DT = obj.GetAllFeesHead();

            dgvFeesHead.DataSource = DT;
            dgvFeesHead.DataBind();

            Message.Show = false;
        }
        protected void btnStramSave_Click(object sender, EventArgs e)
        {
            BusinessLayer.Accounts.StreamGroup stremGrp  = new BusinessLayer.Accounts.StreamGroup();
            Entity.Accounts.StreamGroup        estremGrp = new Entity.Accounts.StreamGroup();

            //courseType = Convert.ToInt32(hidCourse_id.Value.ToString());

            ////--------------------------------------------------------
            //if (intHeaderID == 0)
            //{
            //    estremGrp.intMode = 4;
            //}
            //else
            //{
            //    estremGrp.intMode = 12;
            //}
            ////estremGrp.stream_type_id = Convert.ToInt32(ddlStream1.SelectedValue.ToString());
            ////estremGrp.batch_ID = Convert.ToInt32(ddlBatch.SelectedValue.ToString());
            ////estremGrp.courseID = Convert.ToInt32(ddlCourse1.SelectedValue.ToString());
            //estremGrp.FeesName = txtFeesName.Text.Trim();
            estremGrp.feesID = intHeaderID;


            //int IntLastInsertedID = stremGrp.SaveHeader(estremGrp);
            ////-------------------------------------------------------
            //if (IntLastInsertedID > 0)
            //{
            //    stremGrp = new BusinessLayer.Accounts.StreamGroup();
            //    estremGrp = new Entity.Accounts.StreamGroup();
            //    estremGrp.intMode = 1;
            //    //estremGrp.stream_type_id = Convert.ToInt32(ddlStream1.SelectedValue.ToString());
            //    //estremGrp.batch_ID = Convert.ToInt32(ddlBatch.SelectedValue.ToString());
            //    //estremGrp.courseID = Convert.ToInt32(ddlCourse1.SelectedValue.ToString());


            //    dt = new DataTable();
            //    dt = stremGrp.GetFeesHead(estremGrp);

            //    if (dt.Rows.Count > 0)
            //    {
            //        if (courseType == 1 || courseType == 3)
            //        {
            //            headerCount = 4;
            //        }
            //        else
            //        {
            //            headerCount = 8;
            //        }
            int rowAffacted = 0;

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                for (int j = 0; j < headerCount; j++)
                {
                    string  tdId = "txtFees_" + dt.Rows[i]["id"].ToString() + "_" + j.ToString();
                    TextBox tx   = (TextBox)panelfeesDetails1.FindControl(tdId);
                    if (tx.Text.Length == 0)
                    {
                        tx.Text = "0";
                    }
                    stremGrp               = new BusinessLayer.Accounts.StreamGroup();
                    estremGrp              = new Entity.Accounts.StreamGroup();
                    estremGrp.intMode      = 5;
                    estremGrp.feesID       = Convert.ToInt32(dt.Rows[i]["id"].ToString());
                    estremGrp.feesHeaderID = Convert.ToInt32(ddlMembershipCategory.SelectedValue.Trim());
                    estremGrp.column_name  = j + 1;
                    estremGrp.column_value = Convert.ToInt32(tx.Text.ToString().Trim());
                    rowAffacted           += stremGrp.SaveDetails(estremGrp);
                }
            }
            //    }
            if (rowAffacted > 0)
            {
                Message.IsSuccess = true;
                Message.Text      = "Fees Information Saved Successfully";
            }
            else
            {
                Message.IsSuccess = false;
                Message.Text      = "Can't Save. Duplicate Fees Information Is Not Allowed. This Fees Head Already Exists For This Batch-Course-Stream.";
            }
            Message.Show = true;
            int aa = panelfeesDetails1.Controls.Count;
        }