//Bind Division
        #region [Bind Division]

        private void BindDivision()
        {
            try
            {
                EWA_Common objEWA = new EWA_Common();
                BL_Common  objBL  = new BL_Common();
                objEWA.ClassId = ddlClasses.SelectedValue;

                DataSet ds = objBL.BindDivision_BL(objEWA);

                ddlDivision.DataSource = ds;

                ddlDivision.DataTextField  = "DivisionName";
                ddlDivision.DataValueField = "DivisionId";
                ddlDivision.DataBind();
                //ddlDivision.Items.Insert(0, "Select");
                ddlDivision.Items.Insert(0, new ListItem("Select", "0"));
            }
            catch (Exception exp)
            {
                GeneralErr(exp.Message.ToString());
            }
        }
Пример #2
0
        //Bind Design
        #region [Bind Design]

        private void BindDesignation()
        {
            try
            {
                EWA_Common objEWA = new EWA_Common();
                BL_Common  objBL  = new BL_Common();

                objEWA.OrgId        = Session["OrgId"].ToString();
                objEWA.DepartmentId = ddlDepartment.SelectedValue.ToString();

                DataSet ds = objBL.BindDesignation_BL(objEWA);

                ddlDesignation.DataSource     = ds;
                ddlDesignation.DataTextField  = "DesignationName";
                ddlDesignation.DataValueField = "DesignationId";
                ddlDesignation.DataBind();
                ddlDesignation.Items.Insert(0, "Select");
            }
            catch (Exception exp)
            {
                GeneralErr(exp.Message.ToString());
            }
        }
        //Bind DDL
        #region [Bind DDL]

        private void BindDDLdata()
        {
            try
            {
                BL_Common objBL = new BL_Common();
                // DataSet ds = null;
                //   EWA_Common objEWA = new EWA_Common();

                //    ds = objBL.BindCasteCategory_BL();
                cn.Open();
                SqlCommand    cmd = new SqlCommand("SELECT CasteCategoryId,CasteCategoryName FROM tblCasteCategory where OrgId='" + ddlOrganization.SelectedValue + "'", cn);
                SqlDataReader dr  = cmd.ExecuteReader();
                ddlCasteCategory.DataSource     = dr;
                ddlCasteCategory.DataTextField  = "CasteCategoryName";
                ddlCasteCategory.DataValueField = "CasteCategoryId";
                ddlCasteCategory.DataBind();
                ddlCasteCategory.Items.Insert(0, "Select");
            }
            catch (Exception exp)
            {
                GeneralErr(exp.Message.ToString());
            }
        }
Пример #4
0
        protected void btngridsubmit_Click(object sender, EventArgs e)
        {
            try
            {
                objBL_Common = new BL_Common();
                string columnname = string.Empty;

                if (ddlcolumn.SelectedValue == "1")
                {
                    columnname = "CampaignName";
                }
                else if (ddlcolumn.SelectedValue == "2")
                {
                    columnname = "FromName";
                }
                else if (ddlcolumn.SelectedValue == "3")
                {
                    columnname = "Title";
                }
                else if (ddlcolumn.SelectedValue == "4")
                {
                    columnname = "Emailid";
                }

                objBL_Common.AccessUpdateAllCampaign("EC_Campaign", "" + columnname + " = '" + txtCampName.Value.Trim() + "' ", "PK_CampaignID  in (" + Session["massupdateid"].ToString() + ")");
                lblcontact.Text         = "Your campaign details are updated successfully.";
                lblcontact.CssClass     = "labelsuccess";
                ddlcolumn.SelectedValue = "0";
                txtCampName.Value       = "";
                Session["massupdateid"] = null;
                Session.Remove("massupdateid");
            }
            catch (Exception ex)
            {
                New_EmailCampaign.App_Code.GlobalFunction.StoreLog("MassUpdate.aspx:btngridsubmit_Click() - " + ex.Message);
            }
        }
Пример #5
0
        //Bind Game
        #region [Bind Game]

        private void BindClass()
        {
            try
            {
                EWA_Common objEWA = new EWA_Common();
                BL_Common  objBL  = new BL_Common();
                objEWA.BranchId = ddlBranch.SelectedValue.ToString();
                if (!objEWA.BranchId.Equals("Select"))
                {
                    DataSet ds = objBL.BindClass_BL(objEWA);

                    ddlClass.DataSource = ds;
                    if (ds.Tables[0].Rows.Count != 0)
                    {
                        ddlClass.DataTextField  = "ClassName";
                        ddlClass.DataValueField = "ClassId";
                        ddlClass.DataBind();
                    }
                    else
                    {
                        ddlClass.Items.Clear();
                    }
                }
                else
                {
                    ddlClass.Items.Clear();
                }
                ddlClass.Items.Insert(0, "Select");
                ddlSubject.SelectedIndex = 0;
                ShowEmptyGridView(GrdEmployee);
                ShowEmptyGridView(GrdViewEmployee);
            }
            catch (Exception exp)
            {
                GeneralErr(exp.Message.ToString());
            }
        }
Пример #6
0
        private DataTable BindSubject_Grid(string courseid, string branchid, string classid)
        {
            DataSet ds = new DataSet();

            try
            {
                EWA_Common objEWA = new EWA_Common();
                BL_Common  objBL  = new BL_Common();
                objEWA.OrgId    = Session["OrgId"].ToString();
                objEWA.UserCode = Session["Username"].ToString();
                objEWA.CourseId = courseid; // ddlCourse.SelectedValue;
                objEWA.BranchId = branchid; // ddlBranch.SelectedValue;
                objEWA.ClassId  = classid;  // ddlClass.SelectedValue;
                //if (!objEWA.ClassId.Equals("Select"))
                {
                    ds = objBL.BindAssigned_Subject_BL(objEWA);
                }
            }
            catch (Exception exp)
            {
                GeneralErr(exp.Message.ToString());
            }
            return(ds.Tables[0]);
        }
Пример #7
0
        public void InsertUserPlan(int loginid)
        {
            DataTable dtplantype = new DataTable();

            objBL_Common = new BL_Common();
            try
            {
                dtplantype = objBL_Common.plantypedetails("top 1 *", "EC_PlanType", "LOWER(PlanName)='FREE' and IsActive = 1 order by plandate desc");

                if (dtplantype.Rows.Count > 0)
                {
                    objUserPlan            = new UserPlan();
                    objBL_UserPlan         = new BL_UserPlan();
                    objUserPlan.FK_UserID  = loginid;
                    objUserPlan.FK_PlanID  = Convert.ToInt32(dtplantype.Rows[0]["PK_PlanID"].ToString());
                    objUserPlan.ActiveFrom = DateTime.Now;
                    objUserPlan.ActiveTo   = DateTime.Now.AddMonths(1);
                    objUserPlan.IsActive   = true;
                    objUserPlan.CreatedBy  = loginid;
                    objUserPlan.CreatedOn  = DateTime.Now;
                    objBL_UserPlan.AccessInsertUserPlan(objUserPlan);
                    string[] UPtype = new string[3];
                    UPtype[0] = Convert.ToString(dtplantype.Rows[0]["IsSingleUser"]);
                    UPtype[1] = Convert.ToString(dtplantype.Rows[0]["NOC"]);
                    UPtype[2] = Convert.ToString(dtplantype.Rows[0]["AllowedMails"]);
                    Session["lstUserPlanType"] = UPtype;

                    objUserPlan    = null;
                    objBL_UserPlan = null;
                }
            }
            catch (Exception ex)
            {
                New_EmailCampaign.App_Code.GlobalFunction.StoreLog("FreeAccountSignUp.aspx:InsertUserPlan() - " + ex.Message);
            }
        }
Пример #8
0
        protected void rbtlDesType_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                EWA_Common ObjEWA = new EWA_Common();
                BL_Common  ObjBL  = new BL_Common();
                ObjEWA.DepartmentId      = ddlDepartment.SelectedValue.ToString();
                ObjEWA.DesignationTypeId = rbtlDesType.SelectedValue.ToString();

                DataSet ds = ObjBL.BindDesignation_BL(ObjEWA);
                ddlDesignation.Enabled        = true;
                ddlDesignation.DataSource     = ds;
                ddlDesignation.DataTextField  = "DesignationName";
                ddlDesignation.DataValueField = "DesignationId";
                ddlDesignation.DataBind();
                ddlDesignation.Items.Insert(0, new ListItem("Select", "-1"));
                //ShowEmptyGridView(GrdEmployee);
                //ShowEmptyGridView(GrdViewEmployee);
            }
            catch (Exception exp)
            {
                GeneralErr(exp.Message.ToString());
            }
        }
 public string SaveAdministrativeExpense(string name)
 {
     //  var Pvoucher = BL_Common.Deserialize<BO_COA>(pvoucher);
     return(BL_Common.Serialize(BL_Expense.SaveAdministrativeExpense(name)));
 }
Пример #10
0
 public string GetSaleInvoicesList()
 {
     return(BL_Common.Serialize(BL_SalesReturn.GetSaleInvoicesList()));
 }
        public string GetCurrentCash()
        {
            var banks = BL_Banks.GetBanksList().Find(x => x.bankID == 11);

            return(BL_Common.Serialize(banks));
        }
 public string GetBanksList()
 {
     return(BL_Common.Serialize(BL_Banks.GetBanksList()));
 }
Пример #13
0
        public string DeleteUser(int id)
        {
            var pl = BL_Users.DeleteUser(id, UserAprosysAccounting.id);

            return(BL_Common.Serialize("success"));
        }
Пример #14
0
        public string SaveBonus(BO_BonusRevenue br)
        {
            var empID = UserAprosysAccounting.id;

            return(BL_Common.Serialize(BL_BonusRevenue.SaveBonus(br, empID)));
        }
 public string EDITAdministrativeExpense(int id, string name)
 {
     return(BL_Common.Serialize(BL_Expense.EditAdministrativeExpense(id, name)));
 }
        protected void Button1_Click(object sender, EventArgs e)
        {
            try
            {
                Boolean AllowMail = ValidateAllowedMails();

                if (AllowMail == false)
                    return;

                string body = txta9.Value;
                if (body != "")
                {
                    objBL_Common.AccessUpdateAllCampaign("EC_Campaign", "mailcontent = '" + body + "'", "PK_CampaignID =" + Convert.ToInt32(Session["CampgnID"].ToString()) + "");
                    string destcc = "*****@*****.**";
                    string fromEmailID = System.Configuration.ConfigurationSettings.AppSettings["AryvartAdminEmailID"].ToString();
                    string fromPassword = System.Configuration.ConfigurationSettings.AppSettings["AryvartAdminEmailPassword"].ToString();

                    for (int i = 0; i < gvAddContacts.Rows.Count; i++)
                    {
                        string tomailid = gvAddContacts.Rows[i].Cells[5].Text.ToString();
                        int contactid = 0;
                        Label lblEmpID = (Label)gvAddContacts.Rows[i].Cells[0].FindControl("lblThirdPartyId");

                        if (gvAddContacts.Rows[i].Cells[0].Text.ToString() != null)
                            contactid = Convert.ToInt32(lblEmpID.Text.ToString());

                        string CQIID = CampaignQueueInsert(false, contactid);
                        int PKID = 0;

                        if (CQIID != null)
                        {
                            PKID = Convert.ToInt32(CQIID);
                            var deliveryProcessor = "http://*****:*****@"<img src=""{0}?msg_id={1}""  width=""0"" height=""0"" 
                           style=""width: 0px; height: 0px; border:0px;"" alt=""""/>",
                                       deliveryProcessor, PKID);
                            body += imgTag;
                        }

                        objMailTemplate.fnSendMailToRecipients(fromEmailID, fromPassword, body, destcc, txtTitle.Value.ToString(), tomailid, EmailID.Value.ToString().Trim(), PKID);
                        objBL_Common.AccessUpdateAllCampaign("EC_CampaignQueue", "IsMailSent = " + 1 + ", SentOn = '" + DateTime.Now + "', UpdatedBy = " + Convert.ToInt64(Session["UserID"].ToString()) + ", UpdatedOn = '" + DateTime.Now + "'", "PK_CampaignQueueID =" + Convert.ToInt32(PKID) + "");
                    }

                    objBL_Common = new BL_Common();
                    objBL_Common.AccessUpdateAllCampaign("EC_Campaign", "CampaignStatus = " + 1 + ", SchduleDateTime='" + DateTime.Now + "'", "PK_CampaignID =" + Convert.ToInt32(Session["CampgnID"].ToString()) + "");
                    //ClientScript.RegisterStartupScript(Page.GetType(), "mykey32", "alert('Mail sent successfully to all the recepients.');", true);
                    Session["SelectContactID"] = null;
                    Session.Remove("SelectContactID");
                    Session["CampgnID"] = null;
                    Session.Remove("CampgnID");
                    Response.Redirect("MailSentSuccess.aspx", false);
                }
                else
                {
                    ClientScript.RegisterStartupScript(Page.GetType(), "mykey25", "alert('Enter your mail content text message to send a mail!');", true);
                }
            }
            catch (Exception ex)
            {
                New_EmailCampaign.App_Code.GlobalFunction.StoreLog("CreateCampign.aspx:Button1_Click() - " + ex.Message);
            }
        }
Пример #17
0
        protected void btnGo_Click(object sender, EventArgs e)
        {
            try
            {
                EWA_Common objEWA = new EWA_Common();
                BL_Common  objBL  = new BL_Common();
                objEWA.OrgId      = Session["OrgId"].ToString();
                objEWA.BranchId   = ddlBranch.SelectedValue.ToString();
                objEWA.CourseId   = ddlCourse.SelectedValue.ToString();
                objEWA.ClassId    = ddlClass.SelectedValue.ToString();
                objEWA.SemesterId = ddlSemester.SelectedValue.ToString();

                DataSet ds = objBL.BindResultFormat_BL(objEWA);

                if (ds.Tables[0].Rows.Count > 0 && ds.Tables[1].Rows.Count > 0)
                {
                    DataTable dt = new DataTable();

                    dt.Columns.Add("UserCode");
                    dt.Columns.Add("Student Name");
                    int i = 0;
                    while (ds.Tables[0].Rows.Count > i)
                    {
                        dt.Columns.Add(ds.Tables[0].Rows[i][1].ToString());
                        i++;
                    }

                    i = 0;
                    while (ds.Tables[1].Rows.Count > i)
                    {
                        DataRow dr = dt.NewRow();
                        dr[0] = ds.Tables[1].Rows[i][0].ToString();
                        dr[1] = ds.Tables[1].Rows[i][1].ToString();
                        i++;
                        dt.Rows.Add(dr);
                    }

                    grdResultFormat.DataSource = dt;
                    grdResultFormat.DataBind();
                    grdResultFormat.CellPadding = 10;
                    if (dt.Rows.Count < 0)
                    {
                        grdResultFormat.Rows[0].Cells[0].Text = "Record not found !!!";
                    }

                    //export();
                }
                else
                {
                    GeneralErr("Not Found Recoder...!");
                }
            }
            catch (Exception exp)
            {
                GeneralErr(exp.Message.ToString());
            }

            if (grdResultFormat.Rows.Count > 0)
            {
                Session["CourseId"]   = ddlCourse.SelectedValue.ToString();
                Session["BranchId"]   = ddlBranch.SelectedValue.ToString();
                Session["ClassId"]    = ddlClass.SelectedValue.ToString();
                Session["SemesterId"] = ddlSemester.SelectedValue.ToString();

                //Response.Redirect("~/ResultFormat.aspx");
                BindGrid();
            }
        }
Пример #18
0
        public string GetCustomerBalance(int custId)
        {
            var pl = BL_Customer.GetCustomerBalance(custId);

            return(BL_Common.Serialize(pl));
        }
 public string GetSalesPersonList()
 {
     return(BL_Common.Serialize(BL_SaleInvoice.GetSalesPersonList()));
 }
 // GET: Sales
 public ActionResult Index()
 {
     ViewBag.Taxes = BL_Common.Serialize(TaxesHelper.GetTaxes());
     return(View());
 }
 public string DeleteAdministrativeExpense(int id)
 {
     return(BL_Common.Serialize((BL_Expense.DeleteAdministrativeExpense(id))));
 }
Пример #22
0
 public string GetRevenueAccountList()
 {
     return(BL_Common.Serialize(BL_BonusRevenue.GetRevenueAccountList()));
 }
 public string GetExpenseByID(int id)
 {
     return(BL_Common.Serialize((BL_Expense.GetExpenseByID(id))));
 }
Пример #24
0
        public string SaveUser(string paramuser)
        {
            var _user = BL_Common.Deserialize <BO_Users>(paramuser);

            return(BL_Common.Serialize(BL_Users.SaveUser(_user, UserAprosysAccounting.id)));
        }
Пример #25
0
        public string SaveCustomer(string paramcustomer)
        {
            var _customer = BL_Common.Deserialize <BO_Customers>(paramcustomer);

            return(BL_Common.Serialize((BL_Customer.SaveCustomer(_customer, UserAprosysAccounting.id))));
        }
Пример #26
0
 public string GetBankList()
 {
     return(BL_Common.Serialize(BL_BonusRevenue.GetBankList()));
 }
        protected void btngridsubmit_Click(object sender, EventArgs e)
        {
            Boolean AllowMail = ValidateAllowedMails();

            if (AllowMail == false)
                return;
            string CampTimezone = ddlTimeZone.SelectedValue;
            string dttime = dtScheduledatetime.Value;
            string[] dateString = dttime.Split('/');
            DateTime enter_date = Convert.ToDateTime
            (dateString[1] + "/" + dateString[0] + "/" + dateString[2]);
            DateTime indtime;
            DateTime utcTime = enter_date.ToUniversalTime();            

            if (ddlTimeZone.SelectedIndex > 0)
            {
                indtime = TimeZoneInfo.ConvertTimeBySystemTimeZoneId(Convert.ToDateTime(enter_date.ToString()), ddlTimeZone.SelectedValue, TimeZoneInfo.Local.Id);
                utcTime = new DateTime();
                utcTime = indtime.ToUniversalTime();
                objCampaign.Utctime = utcTime;
            }
            //else
            //    objCampaign.Utctime = utcTime;


            //objCampaign.SchduleDateTime = enter_date;
            string body = txta9.Value;

            if (body != "" && gvAddContacts.Rows.Count > 0)
            {
                objBL_Common = new BL_Common();

                objBL_Common.AccessUpdateAllCampaign("EC_Campaign", "Utctime = '" + utcTime + "', CampTimezone = '" + ddlTimeZone.SelectedValue + "', mailcontent = '" + body + "', CampaignStatus = " + 0 + ", SchduleDateTime = '" + enter_date + "' ", "PK_CampaignID =" + Convert.ToInt32(Session["CampgnID"].ToString()) + "");

                for (int i = 0; i < gvAddContacts.Rows.Count; i++)
                {
                    string tomailid = gvAddContacts.Rows[i].Cells[5].Text.ToString();
                    int contactid = 0;
                    Label lblEmpID = (Label)gvAddContacts.Rows[i].Cells[0].FindControl("lblThirdPartyId");

                    if (gvAddContacts.Rows[i].Cells[0].Text.ToString() != null)
                        contactid = Convert.ToInt32(lblEmpID.Text.ToString());
                    CampaignQueueInsert(false, contactid);
                }
                //objBL_Common = new BL_Common();
                //objBL_Common.AccessUpdateAllCampaign("EC_Campaign", "CampaignStatus = " + 0 + "", "PK_CampaignID =" + Convert.ToInt32(Session["CampgnID"].ToString()) + "");
                objBL_ScheduleMailDetails = new BL_ScheduleMailDetails();
                objScheduleMailDetails = new ScheduleMailDetails();
                Label lblEmpID1 = (Label)gvAddContacts.Rows[0].Cells[0].FindControl("lblThirdPartyId");
                objScheduleMailDetails.FK_ContactID = Convert.ToInt32(lblEmpID1.Text.ToString());
                objScheduleMailDetails.Scheduledatetime = utcTime;
                objScheduleMailDetails.FK_Scheduleby = Convert.ToInt32(Session["UserID"].ToString());
                objScheduleMailDetails.QueueStatus = false;
                objScheduleMailDetails.CreatedBy = Convert.ToInt32(Session["UserID"].ToString());
                objScheduleMailDetails.CreatedOn = DateTime.Now;
                objScheduleMailDetails.FK_CampaignID = Convert.ToInt32(Session["CampgnID"].ToString());
                objBL_ScheduleMailDetails.AccessInsertScheduleMailDetails(objScheduleMailDetails);
                objScheduleMailDetails = null;
                objBL_ScheduleMailDetails = null;
                Session["SelectContactID"] = null;
                Session.Remove("SelectContactID");
                Session["CampgnID"] = null;
                Session.Remove("CampgnID");
                //ClientScript.RegisterStartupScript(Page.GetType(), "mykey26", "alert('Your schedule mail content text message or Choose Recipients to send a mail!');", true);
                Response.Redirect("MailScheduleSuccess.aspx", false);
            }
            else
            {
                ClientScript.RegisterStartupScript(Page.GetType(), "mykey25", "alert('Enter your mail content text message or Choose time zone and Recipients to send a mail!');", true);
            }

        }
Пример #28
0
        public string DeleteCustomer(int customerID)
        {
            var pl = BL_Customer.DeleteCustomer(customerID, UserAprosysAccounting.id);

            return(BL_Common.Serialize(pl));
        }
 public string DeletePurchaseInvoice(string invoiceId)
 {
     return(BL_Common.Serialize(BL_PurchaseInvoice.DeletePurchaseInvoice(invoiceId, UserAprosysAccounting.id)));
 }
Пример #30
0
        public string DeletePaymentHistory(int tranId)
        {
            BL_PaymentHistory obj = new BussinessLogics.BL_PaymentHistory();

            return(BL_Common.Serialize(obj.DeletePaymentHistory(tranId, UserAprosysAccounting.id)));
        }