protected void btnSave_Click(object sender, EventArgs e)
        {
            Criminal_Address_InformationObject caiObject = new Criminal_Address_InformationObject();
            CriminalInformationService cisObj = new CriminalInformationService();

            try
            {
                caiObject.PermanentAddress.District = txtperDistrict.Text;
                caiObject.PermanentAddress.Upozila = txtPerUplozila.Text;
                caiObject.PermanentAddress.UnionWard = txtPerUnion.Text;
                caiObject.PermanentAddress.Village = txtPerVillage.Text;
                caiObject.PermanentAddress.CreateBy = Membership.GetUser().UserName; ;
                caiObject.PermanentAddress.CreateDate = DateTime.Now;
                caiObject.PermanentAddress.LastUpdateBy = Membership.GetUser().UserName; ;
                caiObject.PermanentAddress.LastUpdateDate = DateTime.Now;

                caiObject.PresentAddress.District = txtPreDistrict.Text;
                caiObject.PresentAddress.Upozila = txtPreUpozila.Text;
                caiObject.PresentAddress.UnionWard = txtPreUnion.Text;
                caiObject.PresentAddress.Village = txtPreVillage.Text;
                caiObject.PresentAddress.CreateBy = Membership.GetUser().UserName; ;
                caiObject.PresentAddress.CreateDate = DateTime.Now;
                caiObject.PresentAddress.LastUpdateBy = Membership.GetUser().UserName; ;
                caiObject.PresentAddress.LastUpdateDate = DateTime.Now;

                caiObject.RefNo = txtRefNo.Text;
                caiObject.LastAddressRegion = txtLastAddressRegion.Text;
                caiObject.DurationofStay = txtDurationofStay.Text;
                caiObject.Remarks = txtRemarks.Text;
                caiObject.WorkingArea = txtWorkingArea.Text;
                caiObject.PhoneNo = txtPhoneNo.Text;
                caiObject.MobileNo = txtMobileNo.Text;
                caiObject.email = txtEmail.Text;
                caiObject.CreateBy = Membership.GetUser().UserName; ;
                caiObject.CreateDate = DateTime.Now;
                caiObject.LastUpdateBy = Membership.GetUser().UserName; ;
                caiObject.LastUpdateDate = DateTime.Now;

                if (cisObj.InsertAddressInformation(caiObject))
                {
                    Response.Redirect("criminal-education-information.aspx?refno=" + txtRefNo.Text);
                }
            }
            catch (Exception ex)
            {
                ErrorMessage.Text = ex.Message;
            }
        }
        /// <summary>
        /// Insert Criminal Address Information using this fuction
        /// </summary>
        /// <returns></returns>
        public bool InsertAddressInformation(Criminal_Address_InformationObject caiObject)
        {
            string PreAddressID = Utility.GetNewID("Pre-");
            string PerAddressID = Utility.GetNewID("Per-");
            bool returnStatus = false;

            clsBase baseObj = new clsBase();
            string sqlPreAddresstring = "INSERT INTO [AddressTable] ([ID],[District],[Upozila],[UnionWard],[Village]" +
                                        ",[CreateBy],[CreateDate],[LastUpdateBy],[LastUpdateDate]) VALUES " +
                                        "(@ID,@District,@Upozila,@UnionWard,@Village,@CreateBy,@CreateDate,@LastUpdateBy,@LastUpdateDate)";

            List<SqlParameter> parametersPermanentAddressList = new List<SqlParameter>();
            parametersPermanentAddressList.Add(new SqlParameter("@ID", PerAddressID));
            parametersPermanentAddressList.Add(new SqlParameter("@District", caiObject.PermanentAddress.District));
            parametersPermanentAddressList.Add(new SqlParameter("@Upozila", caiObject.PermanentAddress.Upozila));
            parametersPermanentAddressList.Add(new SqlParameter("@UnionWard", caiObject.PermanentAddress.UnionWard));
            parametersPermanentAddressList.Add(new SqlParameter("@Village", caiObject.PermanentAddress.Village));
            parametersPermanentAddressList.Add(new SqlParameter("@CreateBy", caiObject.PermanentAddress.CreateBy));
            parametersPermanentAddressList.Add(new SqlParameter("@CreateDate", caiObject.PermanentAddress.CreateDate));
            parametersPermanentAddressList.Add(new SqlParameter("@LastUpdateBy", caiObject.PermanentAddress.LastUpdateBy));
            parametersPermanentAddressList.Add(new SqlParameter("@LastUpdateDate", caiObject.PermanentAddress.LastUpdateDate));

            if (baseObj.InsertData(sqlPreAddresstring, parametersPermanentAddressList))
            {

                string sqlPerAddresstring = "INSERT INTO [AddressTable] ([ID],[District],[Upozila],[UnionWard],[Village]" +
                                                        ",[CreateBy],[CreateDate],[LastUpdateBy],[LastUpdateDate]) VALUES " +
                                                        "(@ID,@District,@Upozila,@UnionWard,@Village,@CreateBy,@CreateDate,@LastUpdateBy,@LastUpdateDate)";

                List<SqlParameter> parametersPresentAddressList = new List<SqlParameter>();
                parametersPresentAddressList.Add(new SqlParameter("@ID", PreAddressID));
                parametersPresentAddressList.Add(new SqlParameter("@District", caiObject.PresentAddress.District));
                parametersPresentAddressList.Add(new SqlParameter("@Upozila", caiObject.PresentAddress.Upozila));
                parametersPresentAddressList.Add(new SqlParameter("@UnionWard", caiObject.PresentAddress.UnionWard));
                parametersPresentAddressList.Add(new SqlParameter("@Village", caiObject.PresentAddress.Village));
                parametersPresentAddressList.Add(new SqlParameter("@CreateBy", caiObject.PresentAddress.CreateBy));
                parametersPresentAddressList.Add(new SqlParameter("@CreateDate", caiObject.PresentAddress.CreateDate));
                parametersPresentAddressList.Add(new SqlParameter("@LastUpdateBy", caiObject.PresentAddress.LastUpdateBy));
                parametersPresentAddressList.Add(new SqlParameter("@LastUpdateDate", caiObject.PresentAddress.LastUpdateDate));

                if (baseObj.InsertData(sqlPreAddresstring, parametersPresentAddressList))
                {
                    string sqlstring = "INSERT INTO [Criminal_Address_Information] ([RefNo],[PermanentAddressID],[PresentAddressID]" +
                                       ",[LastAddressRegion],[DurationofStay],[Remarks],[WorkingArea],[PhoneNo],[MobileNo],[email]" +
                                       ",[CreateBy],[CreateDate],[LastUpdateBy],[LastUpdateDate]) VALUES (@RefNo,@PermanentAddressID," +
                                       "@PresentAddressID,@LastAddressRegion,@DurationofStay,@Remarks,@WorkingArea,@PhoneNo,@MobileNo," +
                                       "@email,@CreateBy,@CreateDate,@LastUpdateBy,@LastUpdateDate)";

                    List<SqlParameter> parametersList = new List<SqlParameter>();
                    parametersList.Add(new SqlParameter("@RefNo", caiObject.RefNo));
                    parametersList.Add(new SqlParameter("@PermanentAddressID", PerAddressID));
                    parametersList.Add(new SqlParameter("@PresentAddressID", PreAddressID));
                    parametersList.Add(new SqlParameter("@LastAddressRegion", caiObject.LastAddressRegion));
                    parametersList.Add(new SqlParameter("@DurationofStay", caiObject.DurationofStay));
                    parametersList.Add(new SqlParameter("@Remarks", caiObject.Remarks));
                    parametersList.Add(new SqlParameter("@WorkingArea", caiObject.WorkingArea));
                    parametersList.Add(new SqlParameter("@PhoneNo", caiObject.PhoneNo));
                    parametersList.Add(new SqlParameter("@MobileNo", caiObject.MobileNo));
                    parametersList.Add(new SqlParameter("@email", caiObject.email));
                    parametersList.Add(new SqlParameter("@CreateBy", caiObject.CreateBy));
                    parametersList.Add(new SqlParameter("@CreateDate", caiObject.CreateDate));
                    parametersList.Add(new SqlParameter("@LastUpdateBy", caiObject.LastUpdateBy));
                    parametersList.Add(new SqlParameter("@LastUpdateDate", caiObject.LastUpdateDate));

                    if (baseObj.InsertData(sqlstring, parametersList))
                    {
                        returnStatus = true;
                    }
                }
            }

            return returnStatus;
        }