Esempio n. 1
0
        protected void btnviolationupdate_Click(object sender, EventArgs e)
        {
            ComplaintsLink.TbL_Complaints_Violation obj = new ComplaintsLink.TbL_Complaints_Violation();

            try
            {
                obj.Violation_ID = Convert.ToInt16(hfd_violation.Value.ToString());
                obj.Cmp_ID       = comid;
                obj.Violations   = Convert.ToInt16(ddlviolations.SelectedValue);
                obj.DateAdded    = Convert.ToDateTime(DateTime.Now.ToShortDateString());
                // obj.EnteredBy = "Admin";
                obj.ModifiedBy   = Convert.ToInt32(Session["UID"].ToString());
                obj.ModifiedDate = DateTime.Now;//.ToString("MM/dd/yyyy");
                if (chk_publicinfo.Checked == true)
                {
                    obj.Public_Info = "True";
                }
                else
                {
                    obj.Public_Info = "False";
                }

                int k = ComplaintsLink.Complaints.Complaint_Violation_InsertValues(obj, 102);
            }

            catch
            {
            }
        }
Esempio n. 2
0
        protected void btnviolationsubmit_Click(object sender, EventArgs e)
        {
            ComplaintsLink.TbL_Complaints_Violation obj = new ComplaintsLink.TbL_Complaints_Violation();

            try
            {
                foreach (ListItem li in chbvilation.Items)
                {
                    if (li.Selected == true)
                    {
                        obj.Violation_ID = 0;
                        obj.Cmp_ID       = comid;
                        obj.Violations   = Convert.ToInt16(li.Value);
                        obj.DateAdded    = Convert.ToDateTime(DateTime.Now.ToShortDateString());//.ToString("MM/dd/yyyy");
                        obj.EnteredBy    = Session["UID"].ToString();
                        obj.ModifiedBy   = Convert.ToInt32(Session["UID"].ToString());
                        obj.ModifiedDate = Convert.ToDateTime(DateTime.Now.ToShortDateString());//.ToString("MM/dd/yyyy");
                        if (chk_publicinfo.Checked == true)
                        {
                            obj.Public_Info = "True";
                        }
                        else
                        {
                            obj.Public_Info = "False";
                        }

                        int k = ComplaintsLink.Complaints.Complaint_Violation_InsertValues(obj, 101);
                        li.Selected = false;
                    }
                }
            }

            catch
            {
            }
        }