コード例 #1
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            int adminId = Convert.ToInt32(Session[ConfigurationSettings.AppSettings["SupportSession"].ToString()].ToString());
            FunctionalDefect functionalDefect = new FunctionalDefect()
            {
                Title             = txtFullname.Text,
                Description       = txtDescription.Text,
                FixDate           = Convert.ToDateTime(txtDueDate.Text),
                Administrators_Id = adminId,
                Status            = ddlStatus.Text,
                Resolver_Id       = Convert.ToInt32(ddlResolver.SelectedValue),
                CreatedDate       = DateTime.Now,
                UpdatedDate       = DateTime.Now,
                Priority          = rdoPriority.Text
            };

            functionalDefect = bFunctionalDefect.Create(functionalDefect);
            if (string.IsNullOrEmpty(functionalDefect.ErrorMessage))
            {
                FunctionalDefectStory functionalDefectStory = new FunctionalDefectStory()
                {
                    Defect_Id         = functionalDefect.Defect_Id,
                    Title             = txtFullname.Text,
                    Description       = txtDescription.Text,
                    FixDate           = Convert.ToDateTime(txtDueDate.Text),
                    Administrators_Id = adminId,
                    Status            = ddlStatus.Text,
                    Resolver_Id       = Convert.ToInt32(ddlResolver.SelectedValue),
                    CreatedDate       = DateTime.Now,
                    UpdatedDate       = DateTime.Now,
                    Priority          = rdoPriority.Text
                };

                functionalDefectStory = bFunctionalDefect.CreateDefectStory(functionalDefectStory);

                if (Convert.ToBoolean(ConfigurationSettings.AppSettings["IsEmailEnable"]))
                {
                    string mailBody      = MailHelper.DefectAddedOrUpdated(functionalDefect);
                    string emailIdToSend = MailHelper.EmailToSend();

                    string CreatorAdmin   = bAdministrator.List().Where(m => m.Administrators_Id == functionalDefect.Administrators_Id).FirstOrDefault().EmailId;
                    string DeveloperAdmin = bAdministrator.List().Where(m => m.Administrators_Id == functionalDefect.Resolver_Id).FirstOrDefault().EmailId;
                    emailIdToSend = emailIdToSend + ";" + CreatorAdmin;
                    emailIdToSend = emailIdToSend + ";" + DeveloperAdmin;
                    MailHelper.SendEmail(emailIdToSend, "New Ticket Created", mailBody, "Support Team");
                }
                pnlErrorMessage.Attributes.Remove("class");
                pnlErrorMessage.Attributes["class"] = "alert alert-success alert-dismissable";
                pnlErrorMessage.Visible             = true;
                lblMessage.Text = "Success! New Ticket created successfully";
            }
            else
            {
                pnlErrorMessage.Attributes.Remove("class");
                pnlErrorMessage.Attributes["class"] = "alert alert-danger alert-dismissable";
                pnlErrorMessage.Visible             = true;
                lblMessage.Text = "Faied! to create the ticket. Error : " + Request.QueryString["errormessage"].ToString();
            }
        }
コード例 #2
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            if (Session[ConfigurationSettings.AppSettings["SupportSession"]] != null)
            {
                int           id             = Convert.ToInt32(hdnFunctionalityId.Value);
                Functionality _functionality = bFunctionality.List().Where(m => m.Function_Id == id).FirstOrDefault();
                _functionality.Title             = txtTitle.Text;
                _functionality.Description       = txtDescription.Text;
                _functionality.Developer_Id      = Convert.ToInt32(ddlDeveloper.SelectedValue);
                _functionality.Administrators_Id = Convert.ToInt32(Session[ConfigurationSettings.AppSettings["SupportSession"].ToString()].ToString());;
                _functionality.Status            = ddlStatus.Text;
                _functionality.DateUpdated       = DateTime.Now;

                _functionality = bFunctionality.Update(_functionality);
                if (!String.IsNullOrEmpty(_functionality.ErrorMessage))
                {
                    pnlErrorMessage.Attributes.Remove("class");
                    pnlErrorMessage.Attributes["class"] = "alert alert-danger alert-dismissable";
                    pnlErrorMessage.Visible             = true;
                    lblMessage.Text = "Faied! " + Request.QueryString["errormessage"].ToString();
                }
                else
                {
                    if (Convert.ToBoolean(ConfigurationSettings.AppSettings["IsEmailEnable"]))
                    {
                        string mailBody      = MailHelper.FunctionalityAddedOrUpdated(_functionality);
                        string emailIdToSend = MailHelper.EmailToSend();

                        string CreatorAdmin   = bAdministrator.List().Where(m => m.Administrators_Id == _functionality.Administrators_Id).FirstOrDefault().EmailId;
                        string DeveloperAdmin = bAdministrator.List().Where(m => m.Administrators_Id == _functionality.Developer_Id).FirstOrDefault().EmailId;
                        emailIdToSend = emailIdToSend + ";" + CreatorAdmin;
                        emailIdToSend = emailIdToSend + ";" + DeveloperAdmin;
                        MailHelper.SendEmail(emailIdToSend, "Functionality Updated", mailBody, "Support Team");
                    }
                    pnlErrorMessage.Attributes.Remove("class");
                    pnlErrorMessage.Attributes["class"] = "alert alert-success alert-dismissable";
                    pnlErrorMessage.Visible             = true;
                    lblMessage.Text = "Success! functionality updated successfully";

                    btnCancelEdit.Enabled = false;
                    btnEdit.Enabled       = true;
                    btnSave.Enabled       = false;

                    ddlDeveloper.Visible           = false;
                    lblDeveloperName.Visible       = true;
                    ddlStatus.Visible              = false;
                    lblFunctionalityStatus.Visible = true;
                    txtTitle.Visible                    = false;
                    lblFunctionalityName.Visible        = true;
                    txtDescription.Visible              = false;
                    lblFunctionalityDescription.Visible = true;

                    LoadDetail(id);
                }
            }
        }
コード例 #3
0
        public Stores Update(Stores stores)
        {
            if (Convert.ToBoolean(ConfigurationSettings.AppSettings["IsEmailEnable"]))
            {
                string mailBody = MailHelper.ActivityMail("Stores", "Store Updation done on " + stores.Store_Name +
                                                          "( " + stores.Store_Id + "  and " + stores.StoreCode + " ) successfully.",
                                                          1, DateTime.Now.ToString());

                MailHelper.SendEmail(MailHelper.EmailToSend(), "Store Updation", mailBody, "Rachna Teracotta : Activity Admin");
            }
            return(_store.Update(stores));
        }
コード例 #4
0
        public Administrators Update(Administrators administrators)
        {
            if (Convert.ToBoolean(ConfigurationSettings.AppSettings["IsEmailEnable"]))
            {
                string mailBody = MailHelper.ActivityMail("Administrator", "Administrator Updation done on " + administrators.EmailId +
                                                          "( " + administrators.Administrators_Id + "  and " + administrators.AdminCode + " ) successfully.",
                                                          1, DateTime.Now.ToString());

                MailHelper.SendEmail(MailHelper.EmailToSend(), "Administrator Updation", mailBody, "Rachna Teracotta : Activity Admin");
            }
            return(_administrator.Update(administrators));
        }
コード例 #5
0
        public Invitations Update(Invitations invitations)
        {
            if (Convert.ToBoolean(ConfigurationSettings.AppSettings["IsEmailEnable"]))
            {
                string mailBody = MailHelper.ActivityMail("Invitations", "Invitation Updation done on " + invitations.Invitation_EmailId +
                                                          "( " + invitations.Invitation_Id + "  and " + invitations.Invitation_Code + " ) successfully.",
                                                          1, DateTime.Now.ToString());

                MailHelper.SendEmail(MailHelper.EmailToSend(), "Invitation Updation", mailBody, "Rachna Teracotta : Activity Admin");
            }
            return(_iInvitations.Update(invitations));
        }
コード例 #6
0
        public Invitations Create(Invitations invitations)
        {
            invitations = _iInvitations.Create(invitations);
            if (Convert.ToBoolean(ConfigurationSettings.AppSettings["IsEmailEnable"]))
            {
                string mailBody = MailHelper.ActivityMail("Invitations", "New Invitation " + invitations.Invitation_EmailId +
                                                          "( " + invitations.Invitation_Id + "  and " + invitations.Invitation_Code + " ) created successfully.",
                                                          1, DateTime.Now.ToString());

                MailHelper.SendEmail(MailHelper.EmailToSend(), "New SubCategory Created", mailBody, "Rachna Teracotta : Activity Admin");
            }
            return(invitations);
        }
コード例 #7
0
        public static int Delete(Logo logo)
        {
            dLogo _dLogo = new dLogo();

            if (Convert.ToBoolean(ConfigurationSettings.AppSettings["IsEmailEnable"]))
            {
                string mailBody = MailHelper.ActivityMail("Logo", "Logo Deletion done on " + logo.Logo_Title +
                                                          "( " + logo.Logo_Id + "  and " + logo.LogoCode + " ) successfully.",
                                                          logo.Administrators_Id, DateTime.Now.ToString());

                MailHelper.SendEmail(MailHelper.EmailToSend(), "Logo Deletion", mailBody, "Rachna Teracotta : Activity Admin");
            }
            return(_dLogo.Delete(logo));
        }
コード例 #8
0
        public static int Delete(MetaInformation MetaInformation)
        {
            dMetaInformation _dMetaInformation = new dMetaInformation();

            if (Convert.ToBoolean(ConfigurationSettings.AppSettings["IsEmailEnable"]))
            {
                string mailBody = MailHelper.ActivityMail("Meta Information", "Meta Information Deletion done on " + MetaInformation.Meta_Title +
                                                          "( " + MetaInformation.Meta_Id + "  and " + MetaInformation.Meta_Code + " ) successfully.",
                                                          MetaInformation.Administrators_Id, DateTime.Now.ToString());

                MailHelper.SendEmail(MailHelper.EmailToSend(), "Meta Information Deletion ", mailBody, "Rachna Teracotta : Activity Admin");
            }
            return(_dMetaInformation.Delete(MetaInformation));
        }
コード例 #9
0
        public static int Delete(Ads ads)
        {
            dAds _dads = new dAds();

            if (Convert.ToBoolean(ConfigurationSettings.AppSettings["IsEmailEnable"]))
            {
                string mailBody = MailHelper.ActivityMail("Ads", "Ads Deletion done on" + ads.Ads_RedirectUrl +
                                                          "( " + ads.Ads_Id + "  and " + ads.AdsCode + " ) successfully.",
                                                          1, DateTime.Now.ToString());

                MailHelper.SendEmail(MailHelper.EmailToSend(), "Ads Deletion", mailBody, "Rachna Teracotta : Activity Admin");
            }
            return(_dads.Delete(ads));
        }
コード例 #10
0
        public static int Delete(Categories Category)
        {
            dCategory _dCategory = new dCategory();

            if (Convert.ToBoolean(ConfigurationSettings.AppSettings["IsEmailEnable"]))
            {
                string mailBody = MailHelper.ActivityMail("Sub Category", "Category Deletion done on " + Category.Category_Title +
                                                          "( " + Category.Category_Id + "  and " + Category.CategoryCode + " ) successfully.",
                                                          Category.Administrators_Id, DateTime.Now.ToString());

                MailHelper.SendEmail(MailHelper.EmailToSend(), "Category Deletion ", mailBody, "Rachna Teracotta : Activity Admin");
            }
            return(_dCategory.Delete(Category));
        }
コード例 #11
0
        public static ContactOwner Update(ContactOwner ContactOwner)
        {
            dContactOwner _dContactOwner = new dContactOwner();

            if (Convert.ToBoolean(ConfigurationSettings.AppSettings["IsEmailEnable"]))
            {
                string mailBody = MailHelper.ActivityMail("Contact Detail", "Contact Owner Updation done on " + ContactOwner.Contact_Address +
                                                          "( " + ContactOwner.Contact_Owner_Id + "  and " + ContactOwner.Contact_Owner_Code + " ) successfully.",
                                                          1, DateTime.Now.ToString());

                MailHelper.SendEmail(MailHelper.EmailToSend(), "Contact Owner Updation", mailBody, "Rachna Teracotta : Activity Admin");
            }
            return(_dContactOwner.Update(ContactOwner));
        }
コード例 #12
0
        public static Product Update(Product Product)
        {
            dProduct _dProduct = new dProduct();

            if (Convert.ToBoolean(ConfigurationSettings.AppSettings["IsEmailEnable"]))
            {
                string mailBody = MailHelper.ActivityMail("Product", "Product Updation done on " + Product.Product_Title +
                                                          "( " + Product.Product_Id + "  and " + Product.ProductCode + " ) successfully.",
                                                          Product.Administrators_Id, DateTime.Now.ToString());

                MailHelper.SendEmail(MailHelper.EmailToSend(), "Product Updation", mailBody, "Rachna Teracotta : Activity Admin");
            }
            return(_dProduct.Update(Product));
        }
コード例 #13
0
        public static ProductBanners CreateProductBanner(ProductBanners ProductBanner)
        {
            dProduct _dProduct = new dProduct();

            if (Convert.ToBoolean(ConfigurationSettings.AppSettings["IsEmailEnable"]))
            {
                string mailBody = MailHelper.ActivityMail("Product", "New Product Banner " +
                                                          "( " + ProductBanner.Product_Banner_Id + "  and " + ProductBanner.Product_BannerCode + " ) created successfully.",
                                                          ProductBanner.Administrators_Id, DateTime.Now.ToString());

                MailHelper.SendEmail(MailHelper.EmailToSend(), "New Product Banner Created", mailBody, "Rachna Teracotta : Activity Admin");
            }
            return(_dProduct.CreateProductBanner(ProductBanner));
        }
コード例 #14
0
        public static int Delete(SocialNetworking SocialNetworking)
        {
            dSocialNetworking _dSocialNetworking = new dSocialNetworking();

            if (Convert.ToBoolean(ConfigurationSettings.AppSettings["IsEmailEnable"]))
            {
                string mailBody = MailHelper.ActivityMail("Social Networking", "Social Networking Deletion done on " +
                                                          "( " + SocialNetworking.Scl_Ntk_Id + "  and " + SocialNetworking.Scl_Ntk_Code + " ) successfully.",
                                                          SocialNetworking.Administrators_Id, DateTime.Now.ToString());

                MailHelper.SendEmail(MailHelper.EmailToSend(), "Social Networking Deletion", mailBody, "Rachna Teracotta : Activity Admin");
            }
            return(_dSocialNetworking.Delete(SocialNetworking));
        }
コード例 #15
0
        public static int Delete(UnderConstrunction UnderConstrunction)
        {
            dUnderConstrunction _dUnderConstrunction = new dUnderConstrunction();

            if (Convert.ToBoolean(ConfigurationSettings.AppSettings["IsEmailEnable"]))
            {
                string mailBody = MailHelper.ActivityMail("Under Construnction", "Under Construnction Deletion done on " +
                                                          "( " + UnderConstrunction.UnderConst_Id + "  and " + UnderConstrunction.UnderConstCode + " ) successfully.",
                                                          UnderConstrunction.Administrators_Id, DateTime.Now.ToString());

                MailHelper.SendEmail(MailHelper.EmailToSend(), "UnderConstrunction Deletion", mailBody, "Rachna Teracotta : Activity Admin");
            }
            return(_dUnderConstrunction.Delete(UnderConstrunction));
        }
コード例 #16
0
        public static Stores Create(Stores stores)
        {
            dStores _dStores = new dStores();

            if (Convert.ToBoolean(ConfigurationSettings.AppSettings["IsEmailEnable"]))
            {
                string mailBody = MailHelper.ActivityMail("Stores", "New Store " + stores.Store_Name +
                                                          "( " + stores.Store_Id + "  and " + stores.StoreCode + " ) created successfully.",
                                                          1, DateTime.Now.ToString());

                MailHelper.SendEmail(MailHelper.EmailToSend(), "New Store Created", mailBody, "Rachna Teracotta : Activity Admin");
            }
            return(_dStores.Create(stores));
        }
コード例 #17
0
        public static int Delete(Carts Carts)
        {
            dCarts _dCarts = new dCarts();

            if (Convert.ToBoolean(ConfigurationSettings.AppSettings["IsEmailEnable"]))
            {
                string mailBody = MailHelper.ActivityMail("Carts", "Carts Deletion done on" +
                                                          "( " + Carts.Cart_Id + "  and " + Carts.CartCode + " ) successfully.",
                                                          1, DateTime.Now.ToString());

                MailHelper.SendEmail(MailHelper.EmailToSend(), "Carts Deletion", mailBody, "Rachna Teracotta : Activity Admin");
            }
            return(_dCarts.Delete(Carts));
        }
コード例 #18
0
        public static int Delete(Customers Customer)
        {
            dCustomer _dCustomer = new dCustomer();

            if (Convert.ToBoolean(ConfigurationSettings.AppSettings["IsEmailEnable"]))
            {
                string mailBody = MailHelper.ActivityMail("Sub Customer", "Customer Deletion done on " + Customer.Customers_EmailId +
                                                          "( " + Customer.Customer_Id + "  and " + Customer.CustomerCode + " ) successfully.",
                                                          1, DateTime.Now.ToString());

                MailHelper.SendEmail(MailHelper.EmailToSend(), "Customer Deletion ", mailBody, "Rachna Teracotta : Activity Admin");
            }
            return(_dCustomer.Delete(Customer));
        }
コード例 #19
0
        public static SubCategories Create(SubCategories SubCategory)
        {
            dSubCategory _dSubCategory = new dSubCategory();

            SubCategory = _dSubCategory.Create(SubCategory);
            if (Convert.ToBoolean(ConfigurationSettings.AppSettings["IsEmailEnable"]))
            {
                string mailBody = MailHelper.ActivityMail("Sub Category", "New SubCategory " + SubCategory.SubCategory_Title +
                                                          "( " + SubCategory.SubCategory_Id + "  and " + SubCategory.SubCategoryCode + " ) created successfully.",
                                                          SubCategory.Administrators_Id, DateTime.Now.ToString());

                MailHelper.SendEmail(MailHelper.EmailToSend(), "New SubCategory Created", mailBody, "Rachna Teracotta : Activity Admin");
            }
            return(SubCategory);
        }
コード例 #20
0
        public static Administrators Create(Administrators administrators)
        {
            dAdministrator _dAdministrator = new dAdministrator();

            administrators = _dAdministrator.Create(administrators);
            if (Convert.ToBoolean(ConfigurationSettings.AppSettings["IsEmailEnable"]))
            {
                string mailBody = MailHelper.ActivityMail("Administrator", "New Administrator " + administrators.EmailId +
                                                          "( " + administrators.Administrators_Id + "  and " + administrators.AdminCode + " ) created successfully.",
                                                          1, DateTime.Now.ToString());

                MailHelper.SendEmail(MailHelper.EmailToSend(), "New Administrator Created", mailBody, "Rachna Teracotta : Activity Admin");
            }
            return(administrators);
        }
コード例 #21
0
        public static DealOfTheDay Update(DealOfTheDay DealOfTheDay)
        {
            dDealOfTheDay _dDealOfTheDay = new dDealOfTheDay();

            if (Convert.ToBoolean(ConfigurationSettings.AppSettings["IsEmailEnable"]))
            {
                string mailBody = MailHelper.ActivityMail("Deal Of The Day", "Deal Of The Day Updation done on " +
                                                          "( " + DealOfTheDay.Deal_Id + "  and " + DealOfTheDay.Deal_Code + " ) successfully.",
                                                          DealOfTheDay.Administrators_Id, DateTime.Now.ToString());


                MailHelper.SendEmail(MailHelper.EmailToSend(), "Deal Of The Day Updation", mailBody, "Rachna Teracotta : Activity Admin");
            }
            return(_dDealOfTheDay.Update(DealOfTheDay));
        }
コード例 #22
0
        public static CustomerAddress CreateAddress(CustomerAddress CustomerAddress)
        {
            dCustomer _dCustomer = new dCustomer();

            CustomerAddress = _dCustomer.CreateAddress(CustomerAddress);
            if (Convert.ToBoolean(ConfigurationSettings.AppSettings["IsEmailEnable"]))
            {
                string mailBody = MailHelper.ActivityMail("Customer", "New Customer Address Creation " + CustomerAddress.Customer_AddressLine1 + CustomerAddress.Customer_AddressLine2 +
                                                          "( " + CustomerAddress.CustomerAddress_Id + "  and " + CustomerAddress.CustomerAddress_Code + " ) done successfully.",
                                                          1, DateTime.Now.ToString());


                MailHelper.SendEmail(MailHelper.EmailToSend(), "New Customer Address Created", mailBody, "Rachna Teracotta : Activity Admin");
            }
            return(CustomerAddress);
        }
コード例 #23
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            int           AdminId        = Convert.ToInt32(Session[ConfigurationSettings.AppSettings["SupportSession"].ToString()].ToString());
            int           DeveloperId    = Convert.ToInt32(ddlDeveloper.SelectedValue);
            Functionality _Functionality = new Functionality()
            {
                Administrators_Id = AdminId,
                Developer_Id      = DeveloperId,
                Title             = txtTitle.Text,
                Description       = txtDescription.Text,
                Status            = eFunctionalityStatus.InProgress.ToString(),
                DateCreated       = DateTime.Now,
                DateUpdated       = DateTime.Now
            };

            _Functionality = bFunctionality.Create(_Functionality);
            if (!String.IsNullOrEmpty(_Functionality.ErrorMessage))
            {
                pnlErrorMessage.Attributes.Remove("class");
                pnlErrorMessage.Attributes["class"] = "alert alert-danger alert-dismissable";
                pnlErrorMessage.Visible             = true;
                lblMessage.Text = "Faied! " + Request.QueryString["errormessage"].ToString();
            }
            else
            {
                if (Convert.ToBoolean(ConfigurationSettings.AppSettings["IsEmailEnable"]))
                {
                    string mailBody      = MailHelper.FunctionalityAddedOrUpdated(_Functionality);
                    string emailIdToSend = MailHelper.EmailToSend();

                    string CreatorAdmin   = bAdministrator.List().Where(m => m.Administrators_Id == _Functionality.Administrators_Id).FirstOrDefault().EmailId;
                    string DeveloperAdmin = bAdministrator.List().Where(m => m.Administrators_Id == _Functionality.Developer_Id).FirstOrDefault().EmailId;
                    emailIdToSend = emailIdToSend + ";" + CreatorAdmin;
                    emailIdToSend = emailIdToSend + ";" + DeveloperAdmin;
                    MailHelper.SendEmail(emailIdToSend, "New Functionality Added", mailBody, "Support Team");
                }
                pnlErrorMessage.Attributes.Remove("class");
                pnlErrorMessage.Attributes["class"] = "alert alert-success alert-dismissable";
                pnlErrorMessage.Visible             = true;
                lblMessage.Text = "Success! New functionality created successfully";
            }
        }