Beispiel #1
0
        public static void Save(Entity.Common.MemberFeesConfig config)
        {
            using (DataManager oDm = new DataManager())
            {
                oDm.Add("@pMemberId", SqlDbType.Int, config.MemberId);
                oDm.Add("@pFeesXml", SqlDbType.Xml, config.FeesXml);
                oDm.Add("@pParticularsXml", SqlDbType.Xml, config.ParticularsXml);

                oDm.CommandType = CommandType.StoredProcedure;
                oDm.ExecuteNonQuery("usp_MemberFeesConfig_Save");
            }
        }
Beispiel #2
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            BusinessLayer.Common.MemberFeesConfig objFeesConfig = new BusinessLayer.Common.MemberFeesConfig();
            Entity.Common.MemberFeesConfig        FeesConfig    = new Entity.Common.MemberFeesConfig();
            FeesConfig.MemberId = Convert.ToInt32(ddlMember.SelectedValue);

            string strFeesXml = "<NewDataSet>";

            foreach (GridViewRow gvr in dgvFeesHead.Rows)
            {
                if (gvr.RowType == DataControlRowType.DataRow)
                {
                    TextBox txtAmount = (TextBox)gvr.FindControl("txtAmount");
                    strFeesXml += "<Row";
                    strFeesXml += " FeesHeadId = \"" + dgvFeesHead.DataKeys[gvr.RowIndex].Value.ToString() + "\"";
                    strFeesXml += " Amount = \"" + (string.IsNullOrEmpty(txtAmount.Text.Trim()) ? "0" : txtAmount.Text.Trim()) + "\"";
                    strFeesXml += " />";
                }
            }
            strFeesXml        += "</NewDataSet>";
            FeesConfig.FeesXml = strFeesXml;

            string strParticularsXml = "<NewDataSet>";

            foreach (GridViewRow gvr in dgvDevelopmentFee.Rows)
            {
                if (gvr.RowType == DataControlRowType.DataRow)
                {
                    TextBox txtCapacity  = (TextBox)gvr.FindControl("txtCapacity");
                    TextBox txtFee       = (TextBox)gvr.FindControl("txtFee");
                    TextBox txtNarration = (TextBox)gvr.FindControl("txtNarration");

                    strParticularsXml += "<Row";
                    strParticularsXml += " ParticularsId = \"" + dgvDevelopmentFee.DataKeys[gvr.RowIndex].Values[1].ToString() + "\"";
                    strParticularsXml += " Capacity = \"" + (string.IsNullOrEmpty(txtCapacity.Text.Trim()) ? "0" : txtCapacity.Text.Trim()) + "\"";
                    strParticularsXml += " FeeAmount = \"" + (string.IsNullOrEmpty(txtFee.Text.Trim()) ? "0" : txtFee.Text.Trim()) + "\"";
                    strParticularsXml += " Narration = \"" + txtNarration.Text.Trim().Replace("'", "''") + "\"";
                    strParticularsXml += " />";
                }
            }
            strParticularsXml        += "</NewDataSet>";
            FeesConfig.ParticularsXml = strParticularsXml;

            objFeesConfig.Save(FeesConfig);
            LoadFeesDetails();
            Message.IsSuccess = true;
            Message.Text      = "Fees Saved Successfully";
            Message.Show      = true;
        }
Beispiel #3
0
 public void Save(Entity.Common.MemberFeesConfig config)
 {
     DataAccess.Common.MemberFeesConfig.Save(config);
 }