Пример #1
0
        public static void PMSaveConatctPerson(object ContactPersonInfo)
        {
            iContactPersonInfoClient ContactPersonClient = new iContactPersonInfoClient();

            try
            {
                CustomProfile profile = CustomProfile.GetProfile();
                SP_GetContactPersonListToBindGrid_Result ContactPersonList = new SP_GetContactPersonListToBindGrid_Result();

                if (Sequence != "" && Sequence != "0")
                {
                    ContactPersonList          = ContactPersonClient.GetContactPersonTempDataBySequence(Convert.ToInt64(Sequence), sessionID, TargetObject + "_ContactPerson", profile.Personal.UserID.ToString(), profile.DBConnection._constr);
                    ContactPersonList.Sequence = Convert.ToInt64(Sequence);
                }
                else
                {
                    ContactPersonList.Sequence = 0;
                }
                Dictionary <string, object> rec = new Dictionary <string, object>();
                rec = (Dictionary <string, object>)ContactPersonInfo;

                ContactPersonList.ObjectName     = TargetObject;
                ContactPersonList.ReferenceID    = Convert.ToInt64(Sequence);
                ContactPersonList.CustomerHeadID = 0;
                ContactPersonList.Sequence       = Convert.ToInt64(Sequence);
                ContactPersonList.Name           = rec["Name"].ToString();
                ContactPersonList.Department     = Convert.ToInt64(rec["Department"].ToString());
                ContactPersonList.Designation    = rec["Designation"].ToString();
                // ContactPersonList.Designation = rec["Designation"].ToString();
                ContactPersonList.EmailID          = rec["EmailID"].ToString();
                ContactPersonList.OfficeNo         = rec["OfficeNo"].ToString();
                ContactPersonList.MobileNo         = rec["MobileNo"].ToString();
                ContactPersonList.ContactTypeID    = Convert.ToInt64(rec["ContactTypeID"].ToString());
                ContactPersonList.Remark           = rec["Remark"].ToString();
                ContactPersonList.Active           = "N";   //rec["Active"].ToString(); //Active "N" = Is Archive
                ContactPersonList.CreatedBy        = profile.Personal.UserID.ToString();
                ContactPersonList.CreationDate     = DateTime.Now;
                ContactPersonList.LastModifiedBy   = profile.Personal.UserID.ToString();
                ContactPersonList.LastModifiedDate = DateTime.Now;
                ContactPersonList.CompanyID        = profile.Personal.CompanyID;
                //ContactPersonList.CompanyID = Convert.ToInt64(rec["hdncompanyid"].ToString()); ;
                ContactPersonList.ContactType = rec["ContactType"].ToString();
                ContactPersonList.selected    = "";
                if (Sequence != "0" && Sequence != "")
                {
                    ContactPersonClient.SetValuesToTempData_onChange(sessionID, profile.Personal.UserID.ToString(), TargetObject + "_ContactPerson", Convert.ToInt32(Sequence), ContactPersonList, profile.DBConnection._constr);
                }
                else
                {
                    ContactPersonClient.InsertIntoTemp(ContactPersonList, sessionID, profile.Personal.UserID.ToString(), TargetObject + "_ContactPerson", profile.DBConnection._constr);
                }
                ContactPersonClient.Close();
            }

            catch (System.Exception ex)
            {
                ContactPersonClient.Close();
                Login.Profile.ErrorHandling(ex, "ContactPersonInfo.aspx", "PMSaveAddress");
            }
        }
        public void MoveToArchiveContactPerson(string Ids, string IsArchive, string CurrentObjectName)
        {
            CustomProfile            profile             = CustomProfile.GetProfile();
            iContactPersonInfoClient ContactPersonClient = new iContactPersonInfoClient();

            ContactPersonClient.SetContactPersonArchive(Ids, IsArchive, Convert.ToInt64(profile.Personal.UserID).ToString(), CurrentObjectName + "_ContactPerson", sessionID, profile.DBConnection._constr);
            ContactPersonClient.Close();
        }
Пример #3
0
        public static string PMCheckDuplicate(string ContactName, long Sequence)
        {
            iContactPersonInfoClient ContactPersonClient = new iContactPersonInfoClient();
            CustomProfile            profile             = CustomProfile.GetProfile();
            string Result;

            Result = ContactPersonClient.CheckDuplicateContactPersonName(sessionID, ContactName, Sequence, profile.Personal.UserID.ToString(), TargetObject, profile.DBConnection._constr);
            ContactPersonClient.Close();
            return(Result);
        }
Пример #4
0
        protected void FillDropDown()
        {
            ddlcontacttype.Items.Clear();
            iContactPersonInfoClient ObjContactPerson = new iContactPersonInfoClient();
            CustomProfile            profile          = CustomProfile.GetProfile();

            ddlcontacttype.DataSource = ObjContactPerson.GetContactTypeList(profile.DBConnection._constr);
            ddlcontacttype.DataBind();
            ListItem lst = new ListItem {
                Text = "-Select-", Value = "0"
            };

            ddlcontacttype.Items.Insert(0, lst);
        }
Пример #5
0
        protected void GetRecordFromTempDataBySequenceID(string SequenceNo)
        {
            SP_GetContactPersonListToBindGrid_Result ContactPerson = new SP_GetContactPersonListToBindGrid_Result();
            iContactPersonInfoClient ContactPersonClient           = new iContactPersonInfoClient();

            try
            {
                //lblContactPersonFormHeader.Text = "Add New Conatct Person Info";
                if (SequenceNo != "0")
                {
                    if (sessionID == null)
                    {
                        sessionID = Session.SessionID;
                    }
                    lblContactPersonFormHeader.Text = "Edit Conatct Person Info";
                    CustomProfile profile = CustomProfile.GetProfile();
                    ContactPerson = ContactPersonClient.GetContactPersonTempDataBySequence(Convert.ToInt64(SequenceNo), sessionID, TargetObject + "_ContactPerson", profile.Personal.UserID.ToString(), profile.DBConnection._constr);
                    //ContactPerson = ContactPersonClient.GetContactPersonTempDataBySequence(Convert.ToInt64(SequenceNo), sessionID, "_ContactPerson", profile.Personal.UserID.ToString(), profile.DBConnection._constr);
                    txtName.Text = ContactPerson.Name;
                    //if (ContactPerson.Department != null) { txtDeparment.Text = ContactPerson.Department; }
                    if (ContactPerson.EmailID != null)
                    {
                        txtEmailID.Text = ContactPerson.EmailID;
                    }
                    if (ContactPerson.OfficeNo != null)
                    {
                        txtOfficeNo.Text = ContactPerson.OfficeNo;
                    }
                    if (ContactPerson.MobileNo != null)
                    {
                        txtMobileNo.Text = ContactPerson.MobileNo;
                    }
                    //ddldepartment.SelectedIndex = ddldepartment.Items.IndexOf(ddldepartment.Items.FindByValue(ContactPerson.Department.ToString()));

                    ddlcontacttype.SelectedIndex = ddlcontacttype.Items.IndexOf(ddlcontacttype.Items.FindByValue(ContactPerson.ContactTypeID.ToString()));
                    //if (ContactPerson.InterestedIn != null) { txtIntrestedIn.Text = ContactPerson.InterestedIn; }
                    //if (ContactPerson.Hobbies != null) { txtHobbies.Text = ContactPerson.Hobbies; }
                    //if (ContactPerson.FacebookID != null) { txtFacebookID.Text = ContactPerson.FacebookID; }
                    //if (ContactPerson.TwitterID != null) { txtTwitterID.Text = ContactPerson.TwitterID; }
                    //if (ContactPerson.OtherID != null) { txtOtherID.Text = ContactPerson.OtherID; }
                    //if (ContactPerson.HighestQualification != null) { txtHighestQualification.Text = ContactPerson.HighestQualification; }
                    //if (ContactPerson.CollegeOrUniversity != null) { txtCollege.Text = ContactPerson.CollegeOrUniversity; }
                    //if (ContactPerson.HighSchool != null) { txtHighScholl.Text = ContactPerson.HighSchool; }
                    if (ContactPerson.Remark != null)
                    {
                        txtremark.Text = ContactPerson.Remark;
                    }
                    rbtnActiveYes.Checked = true;
                    rbtnActiveNo.Checked  = false;
                    if (ContactPerson.Active == "N")
                    {
                        rbtnActiveYes.Checked = false; rbtnActiveNo.Checked = true;
                    }
                }
            }
            catch (System.Exception ex)
            {
                Login.Profile.ErrorHandling(ex, this, "ConatactPerson.aspx.cs", "GetRecordFromTempDataBySequenceID");
            }
            finally { ContactPersonClient.Close(); }
        }