Exemplo n.º 1
0
        protected void dgnews_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            if (e.CommandName.ToLower() == "remove")
            {
                objda.action = "delete";
                objda.id     = e.CommandArgument.ToString();
                ds           = objda.department();
                GeneralMethod.alert(this.Page, ds.Tables[0].Rows[0]["msg"].ToString());
                fillgrid();
            }
            if (e.CommandName.ToLower() == "detail")
            {
                blank();

                hidid.Value  = e.CommandArgument.ToString();
                objda.id     = e.CommandArgument.ToString();
                objda.action = "select";
                objda.name   = "";

                ds              = objda.department();
                txtname.Text    = ds.Tables[0].Rows[0]["department"].ToString();
                txtname.Enabled = false;
                txtdes.Text     = ds.Tables[0].Rows[0]["description"].ToString();
                try
                {
                    dropemployee.Text = ds.Tables[0].Rows[0]["mgrid"].ToString();
                }
                catch { dropemployee.SelectedIndex = 0; }
                btnsubmit.Text = "Update";
                // btndelete.Visible = true;
                upadatepanel1.Update();
                ScriptManager.RegisterStartupScript(this, GetType(), "key", "<script type='text/javascript'>opendiv();fixheader();</script>", false);
            }
        }
        protected void dgnews_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            if (e.CommandName == "EmptyInsert")
            {
                TextBox term      = dgnews.FooterRow.FindControl("txtpayterm") as TextBox;
                TextBox gracedays = dgnews.FooterRow.FindControl("txtgracedays") as TextBox;

                objda.id          = "";
                objda.name        = term.Text;
                objda.description = gracedays.Text;
                objda.action      = "insert";
                objda.company     = Session["companyid"].ToString();
                ds = objda.ManagePaymentTerm();
                fillgrid();
                GeneralMethod.alert(this.Page, "Saved Successfully!");
            }
            if (e.CommandName == "del")
            {
                objda.id      = e.CommandArgument.ToString();
                objda.action  = "delete";
                objda.company = Session["companyid"].ToString();
                ds            = objda.ManagePaymentTerm();
                fillgrid();
            }
        }
        /// <summary>
        /// Update the existing row data
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void dgnews_RowUpdating(object sender, GridViewUpdateEventArgs e)
        {
            GridViewRow row = (GridViewRow)dgnews.Rows[e.RowIndex];


            int index = row.RowIndex;

            string hidid     = ((HtmlInputHidden)dgnews.Rows[index].FindControl("hidid")).Value;
            string payterm   = ((TextBox)dgnews.Rows[index].FindControl("txtpayterm")).Text;
            string gracedays = ((TextBox)dgnews.Rows[index].FindControl("txtgracedays")).Text;



            if (payterm != "" && gracedays != "")
            {
                objda.id          = hidid;
                objda.name        = payterm;
                objda.description = gracedays;
                objda.action      = "insert";
                objda.company     = Session["companyid"].ToString();
                ds = objda.ManagePaymentTerm();



                dgnews.EditIndex = -1;
                fillgrid();
            }

            else
            {
                GeneralMethod.alert(this.Page, "Please fill Pay Term or Grace Days!");
            }
        }
        protected void btnsubmit_Click(object sender, EventArgs e)
        {
            objda.nid       = hidid.Value;
            objda.companyId = Session["companyid"].ToString();
            objda.action    = "checkexist";

            objda.CategoryID   = txtcode.Text;
            objda.CategoryName = txtname.Text;

            ds = objda.AssetCategory();
            if (ds.Tables[0].Rows.Count > 0)
            {
                GeneralMethod.alert(this.Page, "Category Code already exists!");
                return;
            }
            objda.action       = "insert";
            objda.nid          = hidid.Value;
            objda.CategoryID   = txtcode.Text;
            objda.CategoryName = txtname.Text;
            objda.CategoryDesc = txtdes.Text;
            objda.ParentId     = "";

            ds = objda.AssetCategory();
            fillCategory();
            fillgrid();
            blank();

            GeneralMethod.alert(this.Page, "Saved Successfully!");
        }
Exemplo n.º 5
0
        protected void dgnews_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            if (e.CommandName.ToLower() == "remove")
            {
                objts.action = "delete";
                objts.nid    = e.CommandArgument.ToString();
                ds           = objts.ManageTax();

                fillgrid();
                GeneralMethod.alert(this.Page, "Deleted Successfully!");
            }
            if (e.CommandName.ToLower() == "detail")
            {
                blank();

                objts.action = "select";
                objts.nid    = e.CommandArgument.ToString();

                ds = objts.ManageTax();
                if (ds.Tables[0].Rows.Count > 0)
                {
                    hidid.Value        = ds.Tables[0].Rows[0]["nid"].ToString();
                    txtname.Text       = ds.Tables[0].Rows[0]["name"].ToString();
                    txttaxpercent.Text = ds.Tables[0].Rows[0]["taxpercentage"].ToString();
                    btnsubmit.Text     = "Update";
                    btndelete.Visible  = true;
                }
                upadatepanel1.Update();
                ScriptManager.RegisterStartupScript(this, GetType(), "key", "<script type='text/javascript'>opendiv();fixheader();</script>", false);
            }
        }
Exemplo n.º 6
0
        protected void insertschedule()
        {
            string msg   = "";
            string grpid = "";

            objts.from     = txtpopfrdate.Text;
            objts.to       = txtpoptodate.Text;
            objts.clientid = drppopclient.Text;
            objts.date     = drppophour.Text + (drppopmin.Text);

            objts.companyId = Session["companyid"].ToString();
            objts.CreatedBy = Session["userid"].ToString();
            objts.empid     = hidexpense.Value;
            objts.projectid = ddlproject.Text;
            objts.type      = rdbtnscheduleType.Text;
            if (rdbtnscheduleType.Text.ToLower() == "office")
            {
                objts.Status = "";
                objts.remark = txtaddremark.Text;
            }
            else
            {
                objts.Status = drppopstatus.Text;
                objts.remark = "";
            }
            ds = objts.insertschedule();
            if (ds != null)
            {
                //if (ds.Tables[0].Rows.Count > 0)
                //{
                //    lblerr.Text = ds.Tables[0].Rows[0]["errormessage"].ToString();
                //    grpid = ds.Tables[0].Rows[0]["groupid"].ToString();
                //}
                if (ds.Tables.Count > 1)
                {
                    if (ds.Tables[1].Rows.Count > 0)
                    {
                        if (objts.type.ToLower() != "office")
                        {
                            sendnewschedulemail(ds.Tables[1]);
                        }
                    }
                }
                txtfrmdate.Text = txtpopfrdate.Text;
                txttodate.Text  = txtpoptodate.Text;
                drpclient.Text  = drppopclient.Text;
            }
            blank();
            fillgrid();
            if (ds != null)
            {
                if (ds.Tables.Count > 1)
                {
                    if (ds.Tables[1].Rows.Count > 0)
                    {
                        GeneralMethod.alert(this, "Saved Successfully");
                    }
                }
            }
        }
Exemplo n.º 7
0
        /// <summary>
        /// Save New Assigned task
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnsubmit_Click(object sender, EventArgs e)
        {
            objts.taskid    = hidclients.Value;
            objts.name      = txtgroup.Text;
            objts.companyId = Session["companyid"].ToString();
            objts.CreatedBy = Session["userid"].ToString();
            objts.nid       = hidid.Value;
            objts.action    = "insert";
            ds = objts.ManageExpenseGroup();
            if (ds.Tables[0].Rows.Count > 0)
            {
                if (ds.Tables[0].Rows[0][0].ToString() == "failure")
                {
                    GeneralMethod.alert(this, "Group title alreay exists, please try again!");
                    ScriptManager.RegisterStartupScript(this, GetType(), "key", "<script type='text/javascript'>opendiv();</script>", false);

                    txtgroup.Focus();
                    return;
                }
                GeneralMethod.alert(this, "Saved successfully");
                blank();
                fillpopexpense();
                searchdata();
                // updatePanelAssign.Update();
            }
        }
        protected void btnsubmit_Click(object sender, EventArgs e)
        {
            if (repearning.Items.Count > 0)
            {
                for (int i = 0; i < repearning.Items.Count; i++)
                {
                    objda.action = "insert";
                    objda.nid    = ((HtmlInputHidden)repearning.Items[i].FindControl("hidid")).Value;
                    objda.title  = ((TextBox)repearning.Items[i].FindControl("txttitle")).Text;
                    objda.amount = ((TextBox)repearning.Items[i].FindControl("txtamount")).Text;
                    ds           = objda.salaryStructure();
                }
            }

            if (repdeduction.Items.Count > 0)
            {
                for (int i = 0; i < repdeduction.Items.Count; i++)
                {
                    objda.action = "insert";
                    objda.nid    = ((HtmlInputHidden)repdeduction.Items[i].FindControl("hidid")).Value;
                    objda.title  = ((TextBox)repdeduction.Items[i].FindControl("txttitle")).Text;
                    objda.amount = ((TextBox)repdeduction.Items[i].FindControl("txtamount")).Text;
                    ds           = objda.salaryStructure();
                }
            }

            GeneralMethod.alert(this.Page, "Saved Successfully!");
        }
        /// <summary>
        /// Update the existing row data
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void dgnews_RowUpdating(object sender, GridViewUpdateEventArgs e)
        {
            GridViewRow row = (GridViewRow)dgnews.Rows[e.RowIndex];

            int index = row.RowIndex;

            string ismemovalue1 = ((HtmlInputHidden)dgnews.Rows[index].FindControl("hiememorequire")).Value;

            if (ismemovalue1 == "Yes")
            {
                if (txtmemo.Content.Trim() == "")
                {
                    GeneralMethod.alert(this.Page, "Memo is required for selected project.");
                    return;
                }
            }

            objts.projectid   = ((HtmlInputHidden)dgnews.Rows[index].FindControl("hidproject")).Value;
            objts.date        = ((TextBox)dgnews.Rows[index].FindControl("txtdate")).Text;
            objts.units       = ((TextBox)dgnews.Rows[index].FindControl("txtunits")).Text;
            objts.description = ((TextBox)dgnews.Rows[index].FindControl("txtdesc")).Text;
            objts.cost        = ((TextBox)dgnews.Rows[index].FindControl("txtcost")).Text;
            objts.MU          = ((TextBox)dgnews.Rows[index].FindControl("txtmu")).Text;
            objts.amount      = ((TextBox)dgnews.Rows[index].FindControl("txtamount")).Text;
            objts.remark      = ((HtmlInputHidden)dgnews.Rows[index].FindControl("hidmemoedit")).Value;

            string[] taskvalue = ((HtmlInputHidden)dgnews.Rows[index].FindControl("hidtask")).Value.Split('#');
            objts.expenseid = taskvalue[0];
            CheckBox chkbilable = ((CheckBox)dgnews.Rows[index].FindControl("chkbillableedit"));

            if (chkbilable.Checked == true)
            {
                objts.isbillable = "1";
            }
            else
            {
                objts.isbillable = "0";
            }

            CheckBox chkreimbursable = ((CheckBox)dgnews.Rows[index].FindControl("chkreimbursableedit"));

            if (chkreimbursable.Checked == true)
            {
                objts.reimbursable = "1";
            }
            else
            {
                objts.reimbursable = "0";
            }


            objts.originalfile = ((HtmlInputHidden)dgnews.Rows[index].FindControl("hidoriginalfile")).Value;
            objts.savedfile    = ((HtmlInputHidden)dgnews.Rows[index].FindControl("hidsavedfile")).Value;
            objts.nid          = ((HtmlInputHidden)row.FindControl("hidnid1")).Value;
            objts.action       = "insert";
            objts.ManageExpenseLog();

            dgnews.EditIndex = -1;
            fillgrid();
        }
        protected void dgnews_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            if (e.CommandName.ToLower() == "remove")
            {
                objfile.action = "delete";
                objfile.nid    = e.CommandArgument.ToString();
                objfile.FileCategoryMaster();

                fillgrid();
                GeneralMethod.alert(this.Page, "Deleted Successfully!");
            }
            if (e.CommandName.ToLower() == "detail")
            {
                blank();
                objfile.nid    = e.CommandArgument.ToString();
                hidid.Value    = objfile.nid;
                objfile.action = "select";
                ds             = objfile.FileCategoryMaster();
                txtname.Text   = ds.Tables[0].Rows[0]["categoryname"].ToString();


                upadatepanel1.Update();
                ScriptManager.RegisterStartupScript(this, GetType(), "key", "<script type='text/javascript'>opendiv();fixheader();</script>", false);
            }
        }
Exemplo n.º 11
0
        // <summary>
        /// Save New Assigned task
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnsubmit_Click(object sender, EventArgs e)
        {
            objpayroll.nid         = "";
            objpayroll.Date        = txtleavedate.Text;
            objpayroll.NumofDays   = txtnoofdays.Text;
            objpayroll.Description = txtdescription.Text;
            objpayroll.Leavetypeid = ddlleavetype.Text;
            if (objpayroll.Leavetypeid == "4" || objpayroll.Leavetypeid == "5")
            {
                hidtodate.Value      = txtleavedate.Text;
                objpayroll.NumofDays = "1";
            }
            objpayroll.RequestDate = hidtodate.Value;
            objpayroll.Empid       = ddlEmployee.Text;
            objpayroll.Createdby   = Session["userid"].ToString();
            objpayroll.Status      = "Approved";
            objpayroll.type        = "Emergency";
            objpayroll.action      = "insertemergencyleave";
            objpayroll.companyid   = Session["companyid"].ToString();

            ds = objpayroll.LeaveRequest();
            sendemail(ds.Tables[0].Rows[0]["nid"].ToString());
            GeneralMethod.alert(this.Page, "Saved Successfully.");

            blank();

            updatePanelAssign.Update();
        }
Exemplo n.º 12
0
        // <summary>
        /// Save New Assigned task
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnsubmit_Click(object sender, EventArgs e)
        {
            objpayroll.nid         = hidid.Value;
            objpayroll.Date        = txtleavedate.Text;
            objpayroll.NumofDays   = txtnoofdays.Text;
            objpayroll.Description = txtdescription.Text;
            objpayroll.Leavetypeid = ddlleavetype.Text;
            if (objpayroll.Leavetypeid == "4" || objpayroll.Leavetypeid == "5" || objpayroll.Leavetypeid == "6")
            {
                hidtodate.Value      = txtleavedate.Text;
                objpayroll.NumofDays = "1";
            }

            objpayroll.Empid     = Session["userid"].ToString();
            objpayroll.Createdby = Session["userid"].ToString();
            //Used RequestDate parameter for LeaveToDate here
            objpayroll.RequestDate = hidtodate.Value;
            objpayroll.action      = "insert";
            objpayroll.companyid   = Session["companyid"].ToString();
            ds = objpayroll.LeaveRequest();
            sendemail(ds.Tables[0].Rows[0]["nid"].ToString());

            blank();
            fillgrid();
            if (hidid.Value == "")
            {
                GeneralMethod.alert(this.Page, "Leave Request Sent Successfully.");
            }
            else
            {
                GeneralMethod.alert(this.Page, "Leave Request modified Successfully.");
            }

            updatePanelAssign.Update();
        }
Exemplo n.º 13
0
        protected void btnSave_OnClick(object sender, EventArgs e)
        {
            string HTMLTemplatePath = Server.MapPath("EmailTemplates/invEmail.html");
            string HTMLBODY         = Editor1.Content;

            File.WriteAllText(HTMLTemplatePath, HTMLBODY);
            GeneralMethod.alert(this.Page, "Saved Successfully!");
        }
Exemplo n.º 14
0
 protected void btndelete_Click(object sender, EventArgs e)
 {
     objuser.action = "delete";
     objuser.id     = hidid.Value;
     ds             = objts.ManageTax();
     blank();
     fillgrid();
     GeneralMethod.alert(this.Page, "Deleted Successfully!");
 }
Exemplo n.º 15
0
        /// <summary>
        /// Delete Holiday
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>

        protected void btndelete_Click(object sender, EventArgs e)
        {
            objpayroll.action = "delete";
            objpayroll.nid    = hidid.Value;
            ds = objpayroll.Holiday();
            blank();
            fillgrid();
            GeneralMethod.alert(this.Page, "Deleted Successfully!");
        }
        protected void btndelete_Click(object sender, EventArgs e)
        {
            dbObject.action = "delete";
            dbObject.nid    = hidid.Value;
            ds = dbObject.vendor();
            blank();
            fillgrid();

            GeneralMethod.alert(this.Page, "Deleted Successfully!");
        }
        protected void btndelete_Click(object sender, EventArgs e)
        {
            objfile.id     = hidid.Value;
            objfile.action = "delete";
            objfile.FileCategoryMaster();
            fillgrid();


            GeneralMethod.alert(this.Page, "Deleted Successfully!");
        }
 protected void btnSave_OnClick(object sender, EventArgs e)
 {
     objadmin.action          = "setcompanytemplate";
     objadmin.companyId       = Session["companyid"].ToString();
     objadmin.invoicetemplate = hidseletedtemplate.Value.Trim();
     ds = objadmin.ManageSettings();
     GeneralMethod.alert(this.Page, "Template update successfully");
     binddetail();
     ScriptManager.RegisterStartupScript(this.Page, GetType(), "key", "<script>checkTemp('" + hidseletedtemplate.Value + "')</script>", false);
 }
Exemplo n.º 19
0
        protected void btnSave_OnClick(object sender, EventArgs e)
        {
            objadmin.action              = "updateAttandance";
            objadmin.companyId           = Session["companyid"].ToString();
            objadmin.machineReadrUsrName = txtUserName.Text;
            objadmin.machineReadrPswd    = txtPassword.Text;

            ds = objadmin.CompanySettings();
            binddetail();
            GeneralMethod.alert(this.Page, "Information saved successfully!");
        }
Exemplo n.º 20
0
        protected void btnSave_OnClick(object sender, EventArgs e)
        {
            objadmin.companyId = Session["companyid"].ToString();
            objadmin.Name      = txtcompanyName.Text;
            objadmin.email     = txtEmail.Text;

            objadmin.website = txtwebsite.Text;

            objadmin.mailhost         = txtmailhost.Text;
            objadmin.receivermail     = txtreceiveremail.Text;
            objadmin.senderemail      = txtsenderEmail.Text;
            objadmin.senderpass       = txtsenderpass.Text;
            objadmin.servercompnyname = txtservercompanyname.Text;
            objadmin.symbol           = ddlcurrency.Text;
            string schedulemail = "";

            //for (int j = 0; j < dlscheduleemail.Items.Count; j++)
            //{
            //    HtmlInputHidden hidempid = (HtmlInputHidden)dlscheduleemail.Items[j].FindControl("hidempid");
            //    CheckBox chkmember = (CheckBox)dlscheduleemail.Items[j].FindControl("checkmember");
            //    if (chkmember.Checked == true)
            //    {
            schedulemail = hidscheduleemailemp.Value;
            //    }
            //}
            string leavemail = "";

            leavemail = hidleaveemailemp.Value;


            objadmin.action            = "managesetting";
            objadmin.emailnotification = rdlemailnoti.Text;
            objadmin.scheduleemail     = schedulemail;
            objadmin.leaveemail        = leavemail;
            objadmin.invoicetemplate   = "default";
            objadmin.invno             = txtnextinvoiceno.Text;
            objadmin.sufix             = txtpostfix.Text;
            objadmin.prefix            = txtprefix.Text;
            objadmin.timezone          = droptimezone.Text;

            //machine reader variables
            objadmin.machineReadrUsrName = txtUserName.Text;
            objadmin.machineReadrPswd    = txtPassword.Text;

            objadmin.ManageSettings();
            hidleaveemailemp.Value    = "";
            hidscheduleemailemp.Value = "";
            listleave2.Items.Clear();
            listcode2.Items.Clear();
            bindemployee();
            binddetail();

            GeneralMethod.alert(this.Page, "Information saved successfully");
        }
        /// <summary>
        /// Save server details
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnsubmit_Click(object sender, EventArgs e)
        {
            objserver.action     = "insert";
            objserver.nid        = hidid.Value;
            objserver.createdby  = Session["userid"].ToString();
            objserver.clientid   = ddlclient.Text;
            objserver.domain     = txt_domain.Text;
            objserver.servercode = txt_serverid.Text;
            objserver.servername = txt_servername.Text;
            string strroles = "";

            for (int i = 0; i < rbtnroles.Items.Count; i++)
            {
                if (rbtnroles.Items[i].Selected == true)
                {
                    strroles += rbtnroles.Items[i].Value + "#";
                }
            }
            objserver.serverrole = strroles;
            objserver.companyid  = Session["companyid"].ToString();
            ds = objserver.Server();
            if (ds.Tables[0].Rows.Count > 0)
            {
                for (int i = 0; i < rptconfig.Items.Count; i++)
                {
                    Repeater rptinner = (Repeater)rptconfig.Items[i].FindControl("rptinner");
                    for (int j = 0; j < rptinner.Items.Count; j++)
                    {
                        TextBox     txtvalue          = (TextBox)rptinner.Items[j].FindControl("txtvalue");
                        HiddenField hidconfigid       = (HiddenField)rptinner.Items[j].FindControl("hidconfigid");
                        HiddenField hidserverconfigid = (HiddenField)rptinner.Items[j].FindControl("hidserverconfigid");
                        objserver.nid         = hidserverconfigid.Value;
                        objserver.serverid    = ds.Tables[0].Rows[0]["nid"].ToString();
                        objserver.configid    = hidconfigid.Value;
                        objserver.configvalue = txtvalue.Text;
                        objserver.action      = "insertserverconfig";
                        objserver.Server();
                    }
                }
            }


            fillgrid();
            if (hidid.Value == "")
            {
                blank();
                GeneralMethod.alert(this.Page, "Saved Successfully!");
            }
            else
            {
                GeneralMethod.alert(this.Page, "Information updated Successfully!");
            }
        }
Exemplo n.º 22
0
        protected void dgnews_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            if (e.CommandName.ToLower() == "remove")
            {
                objtax.action = "delete";
                objtax.nid    = e.CommandArgument.ToString();
                ds            = objtax.Tax_Tax_Client();

                fillGrid();
                GeneralMethod.alert(this.Page, "Deleted Successfully!");
            }
        }
        protected void btnSave_OnClick(object sender, EventArgs e)
        {
            objadmin.action    = "updateInvoiceNo";
            objadmin.companyId = Session["companyid"].ToString();

            objadmin.invno  = txtnextinvoiceno.Text;
            objadmin.sufix  = txtpostfix.Text;
            objadmin.prefix = txtprefix.Text;
            ds = objadmin.CompanySettings();

            GeneralMethod.alert(this.Page, "Information updated successfully!");
        }
        protected void btnSave_OnClick(object sender, EventArgs e)
        {
            objadmin.action    = "updateScheduleEmail";
            objadmin.companyId = Session["companyid"].ToString();
            string schedulemail = "";

            schedulemail           = hidscheduleemailemp.Value;
            objadmin.scheduleemail = schedulemail;
            ds = objadmin.CompanySettings();
            binddetail();
            GeneralMethod.alert(this.Page, "Information saved successfully!");
        }
        protected void btnsubmit_Click(object sender, EventArgs e)
        {
            objda.id   = hidid.Value;
            objda.name = txtname.Text;

            objda.action  = "insert";
            objda.company = Session["companyid"].ToString();
            ds            = objda.ManageBranch();
            blank();
            fillgrid();
            GeneralMethod.alert(this.Page, "Saved Successfully!");
        }
        protected void btnsubmit_Click(object sender, EventArgs e)
        {
            clsObject.nid          = "";
            clsObject.action       = "insert";
            clsObject.AssetId      = assetId;
            clsObject.cLocation    = cLocation;
            clsObject.cLocationId  = cLocationId;
            clsObject.transferTo   = dropTransferTo.SelectedValue;
            clsObject.transferBy   = Session["userid"].ToString();
            clsObject.transferDate = txt_TransferDate.Text;
            clsObject.dueDate      = txtDueDate.Text;
            clsObject.Notes        = txt_Notes.Text;

            /*The switch statement below fills in the selected dropdown value in the tranferToID variable of clsObject*/
            switch (dropTransferTo.SelectedValue)
            {
            case "Individual":
            {
                clsObject.transferToID = drop_departmentName.SelectedValue;
                break;
            }

            case "Repair":
            {
                clsObject.transferToID = drop_vendorName.SelectedValue; break;
            }

            case "Stock":
            {
                clsObject.transferToID = dropTransferTo.SelectedValue;
                break;
            }

            case "Store":
            {
                clsObject.transferToID = dropTransferTo.SelectedValue;
                break;
            }

            case "Inuse":
            {
                clsObject.transferToID = dropTransferTo.SelectedValue;
                break;
            }

            default: { Console.WriteLine("check if data select in drop_transferTo combo is correct"); break; }
            }
            clsObject.companyId = Session["companyid"].ToString();
            clsObject.trasferAssets();
            blank();
            GeneralMethod.alert(this.Page, "Saved Successfully!");
        }
Exemplo n.º 27
0
        protected void btnFullReport_click(object sender, EventArgs e)
        {
            if (dropserver.Text != "")
            {
                fillFullReport(txtfromdate.Text, txttodate.Text, dropserver.Text);

                multiview1.ActiveViewIndex = 1;
            }
            else
            {
                GeneralMethod.alert(this, "Select a server name");
            }
        }
Exemplo n.º 28
0
 protected void btnsave_Click(object sender, EventArgs e)
 {
     objpayroll.nid       = hidid.Value;
     objpayroll.Createdby = Session["userid"].ToString();
     objpayroll.action    = "setstatus";
     objpayroll.Status    = ddlstaus.Text;
     objpayroll.Remark    = "";
     objpayroll.LeaveRequest();
     // txtremark.Text = "";
     ddlstaus.SelectedIndex = 0;
     fillgrid();
     GeneralMethod.alert(this.Page, "Leave's status updated successfully");
 }
        protected void btnSave_OnClick(object sender, EventArgs e)
        {
            objadmin.action    = "updateemail";
            objadmin.companyId = Session["companyid"].ToString();

            objadmin.mailhost          = txtmailhost.Text;
            objadmin.receivermail      = txtsenderEmail.Text;
            objadmin.senderemail       = txtsenderEmail.Text;
            objadmin.senderpass        = txtsenderpass.Text;
            objadmin.emailnotification = rdlemailnoti.Text;
            ds = objadmin.CompanySettings();

            GeneralMethod.alert(this.Page, "Information saved successfully!");
        }
        protected void dgnews_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            if (e.CommandName.ToLower() == "remove")
            {
                objuser.action = "delete";
                objuser.id     = e.CommandArgument.ToString();
                ds             = objuser.ManageEmployee();

                fillgrid();
                GeneralMethod.alert(this.Page, "Deleted Successfully!");
            }
            if (e.CommandName.ToLower() == "detail")
            {
            }
        }