Example #1
0
        public virtual DataSet AddUpdateFormFilling(Entity.FormFilling Entity)
        {
            SqlCommand cmdInsert = new SqlCommand();

            cmdInsert.CommandType    = CommandType.StoredProcedure;
            cmdInsert.CommandTimeout = 0;
            cmdInsert.CommandText    = "dbo.AddUpdateFormFilling";
            this.FillParamsDetails(cmdInsert.Parameters, Entity);
            DataSet res = BaseSQLManager.ExecuteDataset(cmdInsert);

            base.ForceCloseConnection(cmdInsert);
            return(res);
        }
Example #2
0
 protected void FillEntityControlByForm(IDataReader dr, Entity.FormFilling ObjConfigurationHead, int Type)
 {
     ObjConfigurationHead.ConfigurationHeadName = GetField(dr, "ConfigurationHeadName");
     ObjConfigurationHead.ConfigurationHeadId   = GetFieldInt64(dr, "ConfigurationHeadId");
     ObjConfigurationHead.HeadNote                 = GetField(dr, "HeadNote");
     ObjConfigurationHead.InputTypeId              = GetFieldInt(dr, "InputTypeId");
     ObjConfigurationHead.InputType                = GetField(dr, "InputType");
     ObjConfigurationHead.MinInputValue            = GetField(dr, "MinInputValue");
     ObjConfigurationHead.MaxInputValue            = GetField(dr, "MaxInputValue");
     ObjConfigurationHead.IsCompulsaryEntry        = GetFieldBool(dr, "IsCompulsaryEntry");
     ObjConfigurationHead.TemplateDropdownMasterId = GetFieldInt64(dr, "TemplateDropdownMasterId");
     ObjConfigurationHead.TemplateDropdownName     = GetField(dr, "TemplateDropdownName");
 }
        protected void btnSearch_Click(object sender, EventArgs e)
        {
            Entity.FormFilling objFormFilling = new Entity.FormFilling();
            objFormFilling.MinInputValue = "0";

            DataSet   ds = BAL.FormFillingmgmt.GetSearchingControlByForm(ddlFormname.SelectedValue.ToInt32());
            DataTable qt = ds.Tables[1];

            DataTable st = ds.Tables[0];

            objFormFilling.dt = GetQulaifyingHeadData(sectionSerach, qt, st);
            GetListData(objFormFilling.dt);
            GetSetClass(false, true);
        }
Example #4
0
 public void FillParamsDetails(SqlParameterCollection parameters, Entity.FormFilling Entity)
 {
     parameters.AddWithValue("@FormId", Entity.FormId);
     parameters.AddWithValue("@dt", Entity.dt);
     parameters.AddWithValue("@UserId", Entity.UserId);
     parameters.AddWithValue("@HostName", Entity.HostName);
     parameters.AddWithValue("@IpAddr", Entity.IpAddr);
     parameters.AddWithValue("@EventId", Entity.EventId);
     parameters.AddWithValue("@TransactionId", Entity.TransactionId);
     parameters.AddWithValue("@Isupdate", Entity.Isupdate);
     parameters.AddWithValue("@SeqId", Entity.SeqId);
     parameters.AddWithValue("@DistCode", Entity.DistCode);
     parameters.AddWithValue("@TalCode", Entity.TalCode);
     parameters.AddWithValue("@OfficeId", Entity.OfficeId);
     parameters.AddWithValue("@OtherSession", Entity.OtherSession);
 }
Example #5
0
 public static System.Data.DataSet AddUpdateFormFilling(Entity.FormFilling Entity)
 {
     return(new DAL.FormFillingSQL().AddUpdateFormFilling(Entity));
 }
        protected void btnSave_Click(object sender, EventArgs e)
        {
            Entity.FormFilling objFormFilling = new Entity.FormFilling();
            objFormFilling.MinInputValue = "0";

            DataSet   ds = BAL.FormFillingmgmt.GetControlByForm(ddlFormname.SelectedValue.ToInt32(), Session["SeqId"].ToString().ToInt64(), 0);
            DataTable qt = ds.Tables[1];

            DataTable st = ds.Tables[0];

            objFormFilling.dt = GetQulaifyingHeadData(sectionLev1, qt, st);
            if (objFormFilling.dt.Rows.Count == 0)
            {
                msg.GetMsg(this.Page, "Please configure atleast one control.", "");
                return;
            }
            objFormFilling.FormId   = ddlFormname.SelectedValue.ToInt32();
            objFormFilling.HostName = "";
            objFormFilling.IpAddr   = "";
            objFormFilling.SeqId    = Session["SeqId"].ToString().ToInt64();
            if (btnSave.Text.ToString().ToLower() == "update")
            {
                objFormFilling.Isupdate = true;
            }
            else
            {
                objFormFilling.Isupdate = false;
            }

            objFormFilling.DistCode     = Session["DistCode"].ToString();
            objFormFilling.TalCode      = Session["TalCode"].ToString();
            objFormFilling.OfficeId     = Session["OfficeId"].ToString();
            objFormFilling.OtherSession = Session["OtherSession"].ToString();
            DataSet check = BAL.FormFillingmgmt.AddUpdateFormFilling(objFormFilling);

            if (check.Tables.Count > 0)
            {
                for (int i = 0; i < check.Tables.Count; i++)
                {
                    if (check.Tables[i].Rows.Count > 0)
                    {
                        if (Convert.ToInt32(check.Tables[i].Rows[0]["RetVal"]) == 1)
                        {
                            msg.GetMsg(this.Page, check.Tables[i].Rows[0]["RetMsg"].ToString(), "");
                            clrscr();
                            GetSetClass(false, true);
                            btnSearch_Click(null, null);
                        }
                        else if (Convert.ToInt32(check.Tables[i].Rows[0]["RetVal"]) == 2)
                        {
                            DataSet ds1 = BAL.FormFillingmgmt.GetMaxUserIDByFormId(ddlFormname.SelectedValue.ToInt64());
                            //Session["SeqId"] = ds1.Tables[0].Rows[0]["USERID"].ToString().ToInt64() + 1;
                            clrscr();
                            GetSetClass(false, true);
                            msg.GetMsg(this.Page, check.Tables[i].Rows[0]["RetMsg"].ToString(), "");
                            btnSearch_Click(null, null);
                        }
                        else if (Convert.ToInt32(check.Tables[i].Rows[0]["RetVal"]) == -1)
                        {
                            msg.GetMsg(this.Page, check.Tables[i].Rows[0]["RetMsg"].ToString(), "");
                        }
                        else if (Convert.ToInt32(check.Tables[i].Rows[0]["RetVal"]) == -3)
                        {
                            msg.GetMsg(this.Page, check.Tables[i].Rows[0]["RetMsg"].ToString(), "");
                        }
                    }
                }
            }
            else
            {
                msg.GetMsg(this.Page, "ConfigurationForm", "E");
            }
        }