public void PickUp(Transform player)
    {
        if (!isHeld) {
            playerHolding 	= player;
            acCont   		= playerHolding.GetComponent<ActionController> ();
            moveCont 		= playerHolding.GetComponent<MovementController> ();

            if (acCont.canHoldWeapon) {
                isHeld 				 = true;
                acCont.canHoldWeapon = false;
                acCont.holdingWeapon = true;
                transform.parent 	 = playerHolding.transform;
                transform.position 	 = acCont.weaponHoldPosition.position;

                if (inSpawner) {
                    spawner.GetComponent<WeaponSpawner> ().WeaponTaken ();
                    inSpawner = false;
                }

                if (facingRight && !moveCont.facingRight ||	!facingRight && moveCont.facingRight) {
                    Flip ();
                }

                if (GetComponent<PolygonCollider2D> () != null) {
                    GetComponent<PolygonCollider2D> ().enabled = false;
                } else {
                    GetComponent<BoxCollider2D> ().enabled = false;
                }
            }
        }
    }
        public Response<Entities.Action> deleteGroupCanDoAction(string groupId, string actionId)
        {
            IncomingWebRequestContext requestContext = WebOperationContext.Current.IncomingRequest;

            Dictionary<string, string> data = new Dictionary<string, string>();

            string authString = requestContext.Headers[HttpRequestHeader.Authorization];

            data.Add("user_account_id", groupId);
            data.Add("action_id", actionId);

            Request request = makeRequest(requestContext, trimData(data), authString);

            ActionController controller = new ActionController();

            return controller.Call(request);
        }
 void checkAttack()
 {
     RaycastHit hit;
     Debug.Log ("Raycasting");
     Debug.DrawRay(transform.position, transform.TransformDirection(Vector3.forward)*charClass.range, Color.yellow, 1f);
     if (Physics.Raycast (transform.position, transform.TransformDirection (Vector3.forward), out hit, charClass.range)) {
         if (hit.collider.CompareTag ("Player")) {
             otherCharClass = hit.collider.GetComponentInParent<CharacterClass> ();
             otherActionController = hit.collider.GetComponentInParent<ActionController>();
             netview.RPC("takeDamage", RPCMode.OthersBuffered, baseDamage); //TODO target
             Debug.Log ("Attack successful" + baseDamage + " " + otherCharClass.health +"/" + otherCharClass.mHealth);
         }
         else{
             Debug.Log ("Thats not a player..");
         }
     } else {
         Debug.Log("Nothing hit");
     }
 }
    public void Drop()
    {
        if (isHeld) {
            if(GetComponent<PolygonCollider2D> () != null){
                GetComponent<PolygonCollider2D> ().enabled = true;
            } else {
                GetComponent<BoxCollider2D> ().enabled = true;
            }

            transform.rotation 	 = Quaternion.identity;
            facingRight 	 	 = moveCont.facingRight;
            acCont.holdingWeapon = false;
            playerHolding 		 = null;
            acCont 				 = null;
            moveCont 			 = null;
            isHeld 			 	 = false;
            transform.parent 	 = null;
        }
    }
Exemple #5
0
    protected void getUserInfo()
    {
        try
        {
            string  isdata = string.Empty;
            DataSet dsData = (DataSet)ActionController.ExecuteAction("", "Local_Conveyance_Approval.aspx", "pgetrequestdata", ref isdata, txtWIID.Text);
            if (dsData != null)
            {
                txt_pk_id.Text       = Convert.ToString(dsData.Tables[0].Rows[0]["PK_Local_Conveyance_HDR_Id"]);
                spn_req_no.InnerHtml = Convert.ToString(dsData.Tables[0].Rows[0]["REQUEST_NO"]);
                txt_Request.Text     = Convert.ToString(dsData.Tables[0].Rows[0]["REQUEST_NO"]);
                spn_date.InnerHtml   = Convert.ToDateTime(dsData.Tables[0].Rows[0]["created_date"]).ToString("dd-MMM-yyyy");
                txt_Initiator.Text   = Convert.ToString(dsData.Tables[0].Rows[0]["EMP_AD_ID"]);
                Init_Email.Text      = Convert.ToString(dsData.Tables[0].Rows[0]["INIT_MAIL"]);
                txt_tremark.Value    = Convert.ToString(dsData.Tables[0].Rows[0]["REMARK"]);


                DataTable dtUser = (DataTable)ActionController.ExecuteAction("", "Local_Conveyance.aspx", "pgettraveluser", ref isdata, txt_Initiator.Text);
                if (dtUser.Rows.Count > 0)
                {
                    empno.InnerHtml            = Convert.ToString(dtUser.Rows[0]["EMP_ID"]);
                    span_ename.InnerHtml       = Convert.ToString(dtUser.Rows[0]["EMPLOYEE_NAME"]);
                    span_cc.InnerHtml          = Convert.ToString(dtUser.Rows[0]["COST_CENTER_NAME"]);
                    span_dept.InnerHtml        = Convert.ToString(dtUser.Rows[0]["DEPT_NAME"]);
                    span_grade.InnerHtml       = Convert.ToString(dtUser.Rows[0]["GRADE_NAME"]);
                    span_mobile.InnerHtml      = Convert.ToString(dtUser.Rows[0]["MOBILE_NO"]);
                    span_designation.InnerHtml = Convert.ToString(dtUser.Rows[0]["DESG_NAME"]);
                    txt_designation.Text       = Convert.ToString(dtUser.Rows[0]["FK_DESIGNATIONID"]);
                    if (Convert.ToString(dtUser.Rows[0]["BANK_ACCOUNT_NO"]) != "")
                    {
                        span_bank_no.InnerHtml = Convert.ToString(dtUser.Rows[0]["BANK_ACCOUNT_NO"]);
                    }
                    else
                    {
                        span_bank_no.InnerHtml = "NA";
                    }
                    if (Convert.ToString(dtUser.Rows[0]["IFSC_CODE"]).Trim() != "")
                    {
                        span_Ifsc.InnerHtml = Convert.ToString(dtUser.Rows[0]["IFSC_CODE"]);
                    }
                    DataTable dtcode = (DataTable)ActionController.ExecuteAction("", "Local_Conveyance.aspx", "selectdetails", ref isdata, "Local Conveyance", "AdGLCode");

                    span_div.InnerHtml = "NA";
                    DataTable dtApprover = (DataTable)ActionController.ExecuteAction("", "Local_Conveyance.aspx", "pgettravelrequestapprover", ref isdata, txt_Initiator.Text);
                    if (dtApprover != null)
                    {
                        if (dtApprover.Rows.Count > 0)
                        {
                            if (Convert.ToString(dtApprover.Rows[0]["approver"]) != "" && Convert.ToString(dtApprover.Rows[0]["approver"]) != "0")
                            {
                                span_Approver.InnerHtml = Convert.ToString(dtApprover.Rows[0]["approver"]);
                                span_app_name.InnerHtml = Convert.ToString(dtApprover.Rows[0]["approver_name"]);
                            }
                            else
                            {
                                span_Approver.InnerHtml = "NA";
                                span_app_name.InnerHtml = "NA";
                            }
                            txt_Approver_Email.Text = Convert.ToString(dtApprover.Rows[0]["approver_email"]);
                            if (Convert.ToString(dtApprover.Rows[0]["doa_approver"]) != "" && Convert.ToString(dtApprover.Rows[0]["doa_approver"]) != "0")
                            {
                                span_DApprover.InnerHtml = Convert.ToString(dtApprover.Rows[0]["doa_approver"]);
                                span_Dapp_name.InnerHtml = Convert.ToString(dtApprover.Rows[0]["dapprover_name"]);
                            }
                            else
                            {
                                span_Dapp_name.InnerHtml = span_DApprover.InnerHtml = "NA";
                            }
                            doa_email.Text = Convert.ToString(dtApprover.Rows[0]["doa_approver_email"]);
                        }
                        else
                        {
                            span_Approver.InnerHtml = doa_user.Text = "NA";
                        }
                    }

                    fillDocument_Details();
                    fillAuditTrail();
                    fillLocation();
                    fillPayment_Mode();
                    ddlAdv_Location.SelectedValue  = Convert.ToString(dsData.Tables[0].Rows[0]["LOCATION"]);
                    ddl_Payment_Mode.SelectedValue = Convert.ToString(dsData.Tables[0].Rows[0]["PAYMENT_MODE"]);
                }
            }
        }
        catch (Exception Exc) { FSL.Logging.Logger.WriteEventLog(false, Exc); }
    }
Exemple #6
0
    /*void LateUpdate()
     * {
     *      if(PhotonNetwork.room == null) return;
     *
     *      if(!_isLerpEnabled || !_owner.IsClientPlayer) return;
     *
     *      _owner.ThisTransform.localPosition  = Vector3.Lerp( _owner._currPosition , _lerpToPos , SMOOTH * Time.deltaTime);
     *      if( Vector3.Distance(_owner.ThisTransform.localPosition , _lerpToPos) < 0.1f ){
     *              _isLerpEnabled = false;
     *      }
     * }*/

    public virtual bool HandleCommand(ref FCCommand ewd)
    {
        if (PhotonNetwork.room == null)
        {
            return(false);
        }


        switch (ewd._cmd)
        {
        case FCCommand.CMD.CLIENT_MOVE_TO_POINT:
        {
            if (ewd._param1Type != FC_PARAM_TYPE.VECTOR3)
            {
                Debug.LogError("get a CLIENT_MOVE_TO_POINT but param1 is not a vector3");
            }
            else
            {
                _owner._dataSync._position = (Vector3)ewd._param1;
                return(true);
            }
        }
        break;

        case FCCommand.CMD.CLIENT_HURT:
        {
            if (ewd._param1Type != FC_PARAM_TYPE.VECTOR3 || ewd._param2Type != FC_PARAM_TYPE.VECTOR3)
            {
                Debug.LogError("get a CLIENT_HURT but param1 , 2 is not a vector3");
            }
            else
            {
//					Vector3 param1 = (Vector3)ewd._param1;
//				    FC_HIT_TYPE eht = (FC_HIT_TYPE)param1.x;
//					bool isCritical = (param1.y == 0.0 ? false : true);
                //int realDamage = (int)param1.z;

//					Vector3 hitDirection = (Vector3)ewd._param2;

                _owner.SelfMoveAgent.SetPosition(ewd._commandPosition);
                //_owner.ACHandleHurt(eht , isCritical ,realDamage , hitDirection  , true , true , false );
                //Debug.Log("Get FCCommand.CMD.CLIENT_HURT !!!!!!!!!!!!! hitDir = " + hitDirection);
                //CommandManager.Instance.SendFastToSelf(ref ewd);
                return(true);
            }
        }
        break;

        case FCCommand.CMD.CLIENT_HURT_HP:
        {
            if (ewd._param1Type != FC_PARAM_TYPE.INT || ewd._param2Type != FC_PARAM_TYPE.INT)
            {
                Debug.LogError("get a CLIENT_HURT_HP but param1 is not a int");
            }
            else
            {
                _owner.ACReduceHP((int)ewd._param1, (int)ewd._param2, false, false, false, false);
//					_owner._dataSync._hitPoint = (int)ewd._param1;
                return(true);
            }
        }
        break;


        case FCCommand.CMD.CLIENT_THREAT:
        {
            if ((ewd._param1Type != FC_PARAM_TYPE.INT) || (ewd._param2Type != FC_PARAM_TYPE.INT))
            {
                Debug.LogError("get a CLIENT_THREAT but param is not a int");
            }
            else
            {
                //get player objid
                OBJECT_ID player_ID = ObjectManager.Instance.GetObjectByNetworkID((int)ewd._param2);
                if (player_ID == null)
                {
                    Debug.LogError("receive increase threat but bad player");
                }

                //get player AC
                ActionController target = player_ID.fcObj as ActionController;

                //increase threat
                _owner.ACIncreaseThreat((int)ewd._param1, false, target);
                return(true);
            }
        }
        break;


        case FCCommand.CMD.CLIENT_LEVELUP:
        {
            if (ewd._param1Type != FC_PARAM_TYPE.INT)
            {
                Debug.LogError("get a CLIENT_LEVELUP but param is not a int");
            }
            else
            {
                //level up
                _owner.OnLevelUp_FromNet((int)ewd._param1);
                return(true);
            }
        }
        break;

        case FCCommand.CMD.CLIENT_CURRSTATE:
        {
            if (ewd._param1Type != FC_PARAM_TYPE.INT)
            {
                Debug.LogError("get a CLIENT_CURRSTATE_ID but param is not a int");
                //}else if (ewd._param2Type != FC_PARAM_TYPE.FLOAT){
                //	Debug.LogError("get a CLIENT_CURRSTATE_ID but param2 is not float type");
            }
            else
            {
                _clientAICurrStateID = (AIAgent.STATE)ewd._param1;

                //float y = (float)ewd._param2;
                //Quaternion rotation = Quaternion.Euler(new Vector3(0, y, 0));
                //Vector3 v3 = rotation * Vector3.forward;
                //_owner.ACRotateTo(v3,-1,true,true);

                return(true);
            }
        }
        break;

        case FCCommand.CMD.CLIENT_POTION_HP:
        {
            if (ewd._param1Type != FC_PARAM_TYPE.FLOAT || ewd._param2Type != FC_PARAM_TYPE.FLOAT)
            {
                Debug.LogError("get a CLIENT_POTION_HP but param is not a float");
            }
            else
            {
                //increase HP
                _owner.ACEatPotion((float)ewd._param1, (float)ewd._param2, FCConst.POTION_TIME, FCPotionType.Health);
                return(true);
            }
        }
        break;

        case FCCommand.CMD.CLIENT_POTION_ENERGY:
        {
            if (ewd._param1Type != FC_PARAM_TYPE.FLOAT || ewd._param2Type != FC_PARAM_TYPE.FLOAT)
            {
                Debug.LogError("get a CLIENT_POTION_ENERGY but param is not a float");
            }
            else
            {
                //increase EP
                _owner.ACEatPotion((float)ewd._param1, (float)ewd._param2, FCConst.POTION_TIME, FCPotionType.Mana);
                return(true);
            }
        }
        break;

        case FCCommand.CMD.CLIENT_REVIVE:
        {
            if (ewd._param1Type != FC_PARAM_TYPE.NONE)
            {
                Debug.LogError("get a CLIENT_REVIVE but param is not a float");
            }
            else
            {
                //revive now
                //_owner.GoToRevive();
                return(true);
            }
        }
        break;
        }

        return(false);
    }
    protected void getUserInfo()
    {
        try
        {
            string    isdata = string.Empty;
            DataTable dsData = (DataTable)ActionController.ExecuteAction("", "Car_Expense_Approval.aspx", "getpkcarexpns", ref isdata, txtProcessID.Text, txtInstanceID.Text);
            if (dsData != null)
            {
                txt_pk_id.Text       = Convert.ToString(dsData.Rows[0]["PK_CAR_EXPNS_ID"]);
                spn_req_no.InnerHtml = Convert.ToString(dsData.Rows[0]["CAR_EXPENSE_NO"]);
                txt_Request.Text     = Convert.ToString(dsData.Rows[0]["CAR_EXPENSE_NO"]);
                spn_date.InnerHtml   = dsData.Rows[0]["CREATED_DATE"].ToString();
                txt_Initiator.Text   = Convert.ToString(dsData.Rows[0]["AD_ID"]);
                Init_Email.Text      = Convert.ToString(dsData.Rows[0]["INIT_MAIL"]);
                expnsamt.InnerHtml   = dsData.Rows[0]["EXPENSE_AMOUNT"].ToString();
                if (dsData.Rows[0]["FK_PAYMENT_MODE"].ToString() == "1")
                {
                    span_payloc.InnerHtml  = Convert.ToString(dsData.Rows[0]["LOCATION"]);
                    span_paymode.InnerHtml = Convert.ToString(dsData.Rows[0]["PAYMENT_MODE"]);
                }
                else
                {
                    span_paymode.InnerHtml   = Convert.ToString(dsData.Rows[0]["PAYMENT_MODE"]);
                    div_loc.Style["display"] = "none";
                }
            }
            DataTable dtUser = (DataTable)ActionController.ExecuteAction("", "Car_Expense.aspx", "pgettraveluser", ref isdata, txt_Initiator.Text);
            if (dtUser.Rows.Count > 0)
            {
                empno.InnerHtml            = Convert.ToString(dtUser.Rows[0]["EMP_ID"]);
                span_ename.InnerHtml       = Convert.ToString(dtUser.Rows[0]["EMPLOYEE_NAME"]);
                span_cc.InnerHtml          = Convert.ToString(dtUser.Rows[0]["COST_CENTER_NAME"]);
                span_dept.InnerHtml        = Convert.ToString(dtUser.Rows[0]["DEPT_NAME"]);
                span_grade.InnerHtml       = Convert.ToString(dtUser.Rows[0]["GRADE_NAME"]);
                span_mobile.InnerHtml      = Convert.ToString(dtUser.Rows[0]["MOBILE_NO"]);
                span_designation.InnerHtml = Convert.ToString(dtUser.Rows[0]["DESG_NAME"]);
                txt_designation.Text       = Convert.ToString(dtUser.Rows[0]["FK_DESIGNATIONID"]);
                span_division.InnerHtml    = "NA";
                if (Convert.ToString(dtUser.Rows[0]["BANK_ACCOUNT_NO"]) != "")
                {
                    span_bank_no.InnerHtml = Convert.ToString(dtUser.Rows[0]["BANK_ACCOUNT_NO"]);
                }
                else
                {
                    span_bank_no.InnerHtml = "NA";
                }

                if (Convert.ToString(dtUser.Rows[0]["IFSC_CODE"]).Trim() != "")
                {
                    span_Ifsc.InnerHtml = Convert.ToString(dtUser.Rows[0]["IFSC_CODE"]);
                }

                DataTable dtApprover = (DataTable)ActionController.ExecuteAction("", "Car_Expense.aspx", "pgettravelrequestapprover", ref isdata, txt_Initiator.Text);
                if (dtApprover != null)
                {
                    if (dtApprover.Rows.Count > 0)
                    {
                        if (Convert.ToString(dtApprover.Rows[0]["approver"]) != "" && Convert.ToString(dtApprover.Rows[0]["approver"]) != "0")
                        {
                            span_Approver.InnerHtml = Convert.ToString(dtApprover.Rows[0]["approver"]);
                            span_app_name.InnerHtml = Convert.ToString(dtApprover.Rows[0]["approver_name"]);
                        }
                        else
                        {
                            span_Approver.InnerHtml = "NA";
                            span_app_name.InnerHtml = "NA";
                        }
                        txt_Approver_Email.Text = Convert.ToString(dtApprover.Rows[0]["approver_email"]);


                        if (Convert.ToString(dtApprover.Rows[0]["doa_approver"]) != "" && Convert.ToString(dtApprover.Rows[0]["doa_approver"]) != "0")
                        {
                            doa_user.Text            = Convert.ToString(dtApprover.Rows[0]["doa_approver"]);
                            span_DApprover.InnerHtml = Convert.ToString(dtApprover.Rows[0]["doa_approver"]);
                            span_Dapp_name.InnerHtml = Convert.ToString(dtApprover.Rows[0]["dapprover_name"]);
                        }
                        else
                        {
                            span_Dapp_name.InnerHtml = span_DApprover.InnerHtml = "NA";
                            doa_user.Text            = "NA";
                        }
                        doa_email.Text = Convert.ToString(dtApprover.Rows[0]["doa_approver_email"]);
                    }
                    else
                    {
                        span_Approver.InnerHtml = doa_user.Text = "NA";
                    }
                }

                fillDocument_Details();
                // fillAuditTrail();
                // fillLocation();
                //  fillPayment_Mode();

                // ddlAdv_Location.SelectedValue = Convert.ToString(dsData.Tables[0].Rows[0]["LOCATION"]);
                // ddl_Payment_Mode.SelectedValue = Convert.ToString(dsData.Tables[0].Rows[0]["PAYMENT_MODE"]);
            }
        }
        catch (Exception Exc) { FSL.Logging.Logger.WriteEventLog(false, Exc); }
    }
    protected void btnApprove_Click(object sender, EventArgs e)
    {
        try
        {
            ActionController.DisablePageCaching(this);
            if (ActionController.IsSessionExpired(this))
            {
                ActionController.RedirctToLogin(this);
            }
            else
            {
                string remark     = txtRemark.Value;
                string refData    = string.Empty;
                string isInserted = string.Empty;
                string ISValid    = string.Empty;
                if (ddlAction.SelectedItem.Text == "Approve")
                {
                    DataTable dtRole = (DataTable)ActionController.ExecuteAction("", "Car_Expense_Approval.aspx", "getdocapprover", ref isInserted, "CAR EXPENSE PAYMENT APPROVAL");
                    if (dtRole != null && dtRole.Rows.Count > 0)
                    {
                        string[] Dval     = new string[dtRole.Rows.Count];
                        string   Emailids = "";
                        for (int i = 0; i < dtRole.Rows.Count; i++)
                        {
                            Dval[i] = dtRole.Rows[i]["USER_ADID"].ToString().Trim();
                            if (Emailids == "")
                            {
                                Emailids = dtRole.Rows[i]["EMAIL_ID"].ToString().Trim();
                            }
                            else
                            {
                                Emailids = Emailids + "," + dtRole.Rows[i]["EMAIL_ID"].ToString().Trim();
                            }
                        }
                        string isSaved = (string)ActionController.ExecuteAction("", "Car_Expense_Approval.aspx", "update", ref refData, txtProcessID.Text, txtInstanceID.Text, remark, txt_Username.Text, "5");
                        if (isSaved == null || refData.Length > 0 || isSaved == "false")
                        {
                            string[] errmsg = refData.Split(':');
                            Page.RegisterStartupScript("onclick", "<script language='javascript'>{alert('" + errmsg[0].ToString() + "');}</script>");
                        }
                        else
                        {
                            bool isCreate = (bool)WFE.Action.ReleaseStep(txtProcessID.Text, txtInstanceID.Text, "227", "CAR EXPENSE DOCUMENT VERIFICATION", "SUBMIT", "", txt_Username.Text.Trim(), "", "", "", "", "", "", "", "", "", "", Dval, spn_req_no.InnerHtml, txtWIID.Text, ref isInserted);
                            if (isCreate)
                            {
                                try
                                {
                                    string msg = "<pre><font size='3'>Dear Sir/Madam,</font></pre><p/><pre><font size='3'>The Car Expense request has been sent for your Approval.</font></pre></p><pre><font size='3'>Car Expense No: " + spn_req_no.InnerHtml + "</font></pre><pre><font size='3'>Created By: " + span_ename.InnerHtml + "</font></pre></p><pre></b><pre>INTRANET URL:http://" + compname + "/Sudarshan-Portal/Login.aspx</pre><pre>INTERNET URL:https://" + compname + "/Sudarshan-Portal/Login.aspx</pre><br/><pre>Regards</pre><pre><b>Reporting Admin<b></pre><br/><pre></pre><br/><pre><font size='3'  color='red'><i><b>This is a system generated message. We request you not to reply to this message.</b></i></font></pre>";

                                    string emailid = (string)ActionController.ExecuteAction(txt_Username.Text, "Early_Payment_Request.aspx", "insetmaildata", ref isInserted, txtProcessID.Text, txtInstanceID.Text, 0, "CAR EXPENSE DOCUMENT VERIFICATION", "SUBMIT", Emailids, txtEmailID.Text, msg, "Car Expense No: " + spn_req_no.InnerHtml);
                                }
                                catch (Exception)
                                {
                                    throw;
                                }
                                finally
                                {
                                    Page.RegisterStartupScript("onclick", "<script language='javascript'>{alert('Car Expense Request has been Approved Successfully and Send for Account Approval...!');window.open('../../Portal/SCIL/Home.aspx','frmset_WorkArea');}</script>");
                                }
                            }
                        }
                    }
                    else
                    {
                        Page.RegisterStartupScript("onclick", "<script language='javascript'>{alert('Car Payment Approver Not Found...!');}</script>");
                    }
                }
                else if (ddlAction.SelectedItem.Text == "Send-Back")
                {
                    refData            = string.Empty;
                    isInserted         = string.Empty;
                    ISValid            = string.Empty;
                    txt_Condition.Text = "3";
                    remark             = txtRemark.Value;

                    DataTable dtback = (DataTable)ActionController.ExecuteAction("", "Car_Expense_Approval.aspx", "getsendback", ref refData, txtProcessID.Text, txtInstanceID.Text);
                    if (dtback != null && dtback.Rows.Count > 0)
                    {
                        txtEmailID.Text = dtback.Rows[0]["EMAIL_ID"].ToString();
                        string isSaved = (string)ActionController.ExecuteAction("", "Car_Expense_Approval.aspx", "update", ref refData, txtProcessID.Text, txtInstanceID.Text, remark, txt_Username.Text, "6");

                        if (isSaved == null || refData.Length > 0 || isSaved == "false")
                        {
                            string[] errmsg = refData.Split(':');
                            Page.RegisterStartupScript("onclick", "<script language='javascript'>{alert('" + errmsg[0].ToString() + "');}</script>");
                        }
                        else
                        {
                            string[] Dval = new string[1];
                            Dval[0] = dtback.Rows[0]["actionbyuser"].ToString();
                            bool isCreate = (bool)WFE.Action.ReleaseStep(txtProcessID.Text, txtInstanceID.Text, "228", "CAR EXPENSE DOCUMENT VERIFICATION", "SEND-BACK", dtback.Rows[0]["actionbyuser"].ToString(), txt_Username.Text.Trim(), "", "", "", "", "", "", "", "", "", "", Dval, spn_req_no.InnerHtml, txtWIID.Text, ref isInserted);
                            if (isCreate)
                            {
                                try
                                {
                                    string msg     = "<pre><font size='3'>Dear Sir/Madam,</font></pre><p/> <pre><font size='3'>The Car Expense request has been Send Back To Initiator.</font></pre><p/><pre><font size='3'>Car Expense No: " + spn_req_no.InnerHtml + "</font></pre><pre><font size='3'>Created By: " + span_ename.InnerHtml + "</font></pre></p><pre></b><pre>INTRANET URL:http://" + compname + "/Sudarshan-Portal/Login.aspx</pre><pre>INTERNET URL:https://" + compname + "/Sudarshan-Portal/Login.aspx</pre><br/><pre>Regards</pre><pre><b>Reporting Admin<b></pre><br/><pre></pre><br/><pre><font size='3'  color='red'><i><b>This is a system generated message. We request you not to reply to this message.</b></i></font></pre>";
                                    string emailid = (string)ActionController.ExecuteAction(txt_Username.Text, "Early_Payment_Request.aspx", "insetmaildata", ref isInserted, txtProcessID.Text, txtInstanceID.Text, 0, "CAR EXPENSE DOCUMENT VERIFICATION", "SUBMIT", Init_Email.Text, "", msg, "Car Expense No: " + spn_req_no.InnerHtml);
                                }
                                catch (Exception ex)
                                {
                                    // throw;
                                    FSL.Logging.Logger.WriteEventLog(false, ex);
                                }
                                finally
                                {
                                    Page.RegisterStartupScript("onclick", "<script language='javascript'>{alert('Car Expense Request send-back Successfully...!');window.open('../../Portal/SCIL/Home.aspx','frmset_WorkArea');}</script>");
                                }
                            }
                        }
                    }
                    else
                    {
                        Page.RegisterStartupScript("onclick", "<script language='javascript'>{alert('Send-back Approver Not Found...!');}</script>");
                    }
                }
                else if (ddlAction.SelectedItem.Text == "Reject")
                {
                    remark  = txtRemark.Value;
                    refData = string.Empty;
                    string isSaved = (string)ActionController.ExecuteAction("", "Car_Expense_Approval.aspx", "update", ref refData, txtProcessID.Text, txtInstanceID.Text, remark, txt_Username.Text, "10");
                    if (isSaved == null || refData.Length > 0 || isSaved == "false")
                    {
                        string[] errmsg = refData.Split(':');
                        Page.RegisterStartupScript("onclick", "<script language='javascript'>{alert('" + errmsg[0].ToString() + "');}</script>");
                    }
                    else
                    {
                        string[] Dval = new string[1];
                        Dval[0] = txt_Username.Text;
                        bool isCreate = (bool)WFE.Action.ReleaseStep(txtProcessID.Text, txtInstanceID.Text, "235", "CAR EXPENSE DOCUMENT VERIFICATION", "REJECT", txt_Username.Text, txt_Username.Text.Trim(), "", "", "", "", "", "", "", "", "", "", Dval, spn_req_no.InnerHtml, txtWIID.Text, ref isInserted);
                        if (isCreate)
                        {
                            try
                            {
                                string msg = "<pre><font size='3'>Dear Sir/Madam,</font></pre><p/> <pre><font size='3'>Car Expense Request has been Rejected.</font></pre><p/> <pre><font size='3'>Car Expense No: " + spn_req_no.InnerHtml + "</font></pre> <pre><font size='3'>Created By: " + txt_Initiator.Text.Trim() + "</font></pre></p><pre></b><pre>INTERNET URL:https://" + compname + "/Sudarshan-Portal/Login.aspx</pre><br/><pre>Regards</pre><pre><b>Reporting Admin<b></pre><br/><pre></pre><br/><pre><font size='3'  color='red'><i><b>This is a system generated message. We request you not to reply to this message.</b></i></font></pre>";

                                string emailid = (string)ActionController.ExecuteAction(txt_Username.Text, "Early_Payment_Request.aspx", "insetmaildata", ref isInserted, txtProcessID.Text, txtInstanceID.Text, 0, "CAR EXPENSE DOCUMENT VERIFICATION", "REJECT", Init_Email.Text, txtEmailID.Text, msg, "Request No: " + spn_req_no.InnerHtml);
                            }
                            catch (Exception)
                            {
                                throw;
                            }
                            finally
                            {
                                Page.RegisterStartupScript("onclick", "<script language='javascript'>{alert('Car Expense Request has been Rejected...!');window.open('../../Portal/SCIL/Home.aspx','frmset_WorkArea');}</script>");
                            }
                        }
                    }
                }
            }
        }
        catch (Exception ex)
        {
            FSL.Logging.Logger.WriteEventLog(false, ex);
        }
    }
 public abstract void Activate(Unit unit, Action action, ActionController controller);
        /// <summary>
        /// Creates the specific ActionController of the '_Auto_' Action pattern.
        /// </summary>
        /// <param name="parentController">Parent controller.</param>
        /// <returns>Specific ActionController of the '_Auto_' Action pattern.</returns>
        public static ActionController Action__Auto_(IUController parentController)
        {
            // Action _Auto_.
            ActionController lActionController = new ActionController("_Auto_", parentController, Properties.Settings.Default.ConjunctionPolicy);

            string[] lAgentsActionItem0 = { Agents.Administrador };
            List <KeyValuePair <string, string[]> > lAttrActivationItem0 = new List <KeyValuePair <string, string[]> >();

            lActionController.Add(
                0,
                "Crear nave nodriza",
                "Clas_1347649273856884AccOfer_AutoElemAcc_1_Alias",
                lAgentsActionItem0,
                "NaveNodriza",
                typeof(InteractionToolkit.NaveNodriza.IUServices.Crear_NaveNodrizaInboundIT).FullName, "",
                ActionItemType.Creation,
                false,
                true,
                lAttrActivationItem0);

            string[] lAgentsActionItem1 = { Agents.Administrador };
            List <KeyValuePair <string, string[]> > lAttrActivationItem1 = new List <KeyValuePair <string, string[]> >();

            lActionController.Add(
                1,
                "Destroy",
                "Clas_1347649273856884AccOfer_AutoElemAcc_2_Alias",
                lAgentsActionItem1,
                "NaveNodriza",
                typeof(InteractionToolkit.NaveNodriza.IUServices.SIU_delete_instanceInboundIT).FullName,
                "",
                ActionItemType.Destruction,
                false,
                true,
                lAttrActivationItem1);

            string[] lAgentsActionItem2 = { Agents.Administrador };
            List <KeyValuePair <string, string[]> > lAttrActivationItem2 = new List <KeyValuePair <string, string[]> >();

            lActionController.Add(
                2,
                "Edit",
                "Clas_1347649273856884AccOfer_AutoElemAcc_3_Alias",
                lAgentsActionItem2,
                "NaveNodriza",
                typeof(InteractionToolkit.NaveNodriza.IUServices.SIU_edit_instanceInboundIT).FullName,
                "",
                ActionItemType.Normal,
                false,
                true,
                lAttrActivationItem2);

            string[] lAgentsActionItem3 = { Agents.Administrador };
            List <KeyValuePair <string, string[]> > lAttrActivationItem3 = new List <KeyValuePair <string, string[]> >();

            lActionController.Add(
                3,
                "NaveNodriza",
                "Clas_1347649273856884AccOfer_AutoElemAcc_4_Alias",
                lAgentsActionItem3,
                "NaveNodriza",
                typeof(InteractionToolkit.NaveNodriza.IUInstances._Auto_IT).FullName,
                "",
                ActionItemType.Other,
                false,
                false,
                lAttrActivationItem3);

            string[] lAgentsActionItem4 = Logic.InstanceReportsList.GetAgentsForClass("NaveNodriza");
            List <KeyValuePair <string, string[]> > lAttrActivationItem4 = new List <KeyValuePair <string, string[]> >();

            lActionController.Add(
                4,
                LanguageConstantValues.L_PRINT,
                LanguageConstantKeys.L_PRINT,
                lAgentsActionItem4,
                "NaveNodriza",
                typeof(InteractionToolkit.PrintForm).FullName,
                "",
                ActionItemType.Print,
                true,
                true,
                lAttrActivationItem4);

            return(lActionController);
        }
    public string get_Travel_Policy_Data(string search_data, int pageno, int rpp, string desg, string division)
    {
        StringBuilder str = new StringBuilder();

        try
        {
            DataTable DTS;
            string    IsValid   = string.Empty;
            string    procedure = "X_Domestic_Policy";
            DTS = (DataTable)ActionController.ExecuteAction("", "Domestic_Policy.aspx", "select", ref IsValid, division, desg, procedure, search_data);
            DTS.Columns[0].ColumnName = "Sr.No";
            //Session["ResultData"] = DTS;

            str.Append("<table id='data-table1'  runat='server' class='table table-bordered table-hover'> <thead><tr class='grey'><th style='width:5%'>#</th><th>Designation</th><th>Journey Type</th><th>Travel Mode</th><th>Travel Class</th><th>Plant From</th><th>Plant To</th><th>Expense Head</th><th>Amount</th></tr></thead>");
            str.Append("<tbody>");

            if (DTS.Rows.Count > 0)
            {
                int ddl  = rpp;
                int from = (pageno - 1) * ddl;
                int to   = ((pageno - 1) * ddl) + ddl;
                for (int i = from; i < to; i++)
                {
                    if (i < DTS.Rows.Count)
                    {
                        str.Append("<tr>");
                        str.Append("<td align='left'><input type='text' Id='pk_dom_id" + (i + 1) + "' value='" + DTS.Rows[i]["PK_DOMESTIC_ID"].ToString() + "' style='display:none'/> " + (i + 1) + "</td>");
                        str.Append("<td align='left'>" + DTS.Rows[i]["DESG_NAME"].ToString() + "</td>");
                        str.Append("<td align='left'>" + DTS.Rows[i]["JOURNEY_TYPE"].ToString() + "</td>");
                        str.Append("<td align='left'>" + DTS.Rows[i]["TRAVEL_NAME"].ToString() + "</td>");
                        str.Append("<td align='left'>" + DTS.Rows[i]["TRAVEL_MAPPING_CLASS"].ToString() + "</td>");
                        str.Append("<td align='left'>" + DTS.Rows[i]["PLANT_NAME"].ToString() + "</td>");
                        str.Append("<td align='left'>" + DTS.Rows[i]["PLANT_NAME1"].ToString() + "</td>");
                        str.Append("<td align='left'>" + DTS.Rows[i]["EXPENSE_HEAD"].ToString() + "</td>");
                        str.Append("<td align='right'>" + DTS.Rows[i]["AMOUNT"].ToString() + "</td>");
                        str.Append("</tr>");
                    }
                }
            }
            str.Append("</tbody> </table> ");

            double cnt = Convert.ToDouble(DTS.Rows.Count) / rpp;
            if (cnt > Convert.ToInt16(Convert.ToInt32(DTS.Rows.Count) / rpp))
            {
                cnt = (int)cnt + 1;
            }

            if (cnt > 1)
            {
                str.Append("<div class='dataTables_paginate paging_simple_numbers' style='text-align:center'>");
                str.Append("<ul class='pagination'>");
                for (int j = 1; j <= cnt; j++)
                {
                    str.Append("<li class='paginate_button'><input type='button' value='" + j + "' class='btn btn-default buttons-copy buttons-flash' style=' font-weight:normal; margin: 3px' onclick='gotopage(this," + rpp + ")' style='margin:5px;'></li>");
                }
                str.Append("</ul></div>");
            }
        }
        catch (Exception ex)
        {
            FSL.Logging.Logger.WriteEventLog(false, ex);
        }
        return(str.ToString());
    }
Exemple #12
0
    public GameObject AssembleCharacter(string label)
    {
        AcData data = DataManager.Instance.CurAcDataList.Find(label);

        if (data == null)
        {
            Debug.LogError("can't find ac data: [" + label + "]");
            return(null);
        }

        AddCharacterToLoad(data.characterId);


        CharacterInformation ci = null;

        if (_activedCharacters.TryGetValue(data.characterId, out ci))
        {
            // prepare ai module prefab.
            GameObject aiModule = InJoy.AssetBundles.AssetBundles.Load(ci.aiAgentPath) as GameObject;
            if (aiModule != null)
            {
                // instance a graphics model.
                GameObject model = CharacterFactory.Singleton.AssembleCharacter(ci.modelPath);
                if (model != null)
                {
                    GameObject ai = GameObject.Instantiate(aiModule) as GameObject;
                    // assemble ActionController
                    ActionController ac = model.GetComponent <ActionController>();
                    if (ac == null)
                    {
                        ac = model.AddComponent <ActionController>();
                    }
                    //ac._data = ci.extraData.Duplicate();
                    ac.Data                    = data;
                    ac._agent                  = ai;
                    ai.transform.parent        = model.transform;
                    ai.transform.localPosition = Vector3.zero;
                    ai.transform.localRotation = Quaternion.identity;
                    ai.transform.localScale    = Vector3.one;

                    //trace all colliders in children
                    //if I find the Damage collider, regist it
                    bool hasFindDamageCollider = false;

                    Collider[] colliders = model.GetComponentsInChildren <Collider>();
                    foreach (Collider collider in colliders)
                    {
                        if (collider.gameObject.name == "DamageCollider")
                        {
                            hasFindDamageCollider = true;
                            ActionControllerManager.Instance.RegisterACByCollider(ac, collider);
                        }
                    }

                    //no damage collider found
                    //register the collider in the root.
                    if (!hasFindDamageCollider)
                    {
                        Collider colliderInRoot = model.GetComponent <Collider>();
                        if ((colliderInRoot != null) && (ActionControllerManager.Instance != null))
                        {
                            ActionControllerManager.Instance.RegisterACByCollider(ac, colliderInRoot);
                        }
                    }

                    // navMesh component settings.
                    NavMeshAgent nma    = model.GetComponentInChildren <NavMeshAgent>();
                    MoveAgent[]  agents = model.GetComponentsInChildren <MoveAgent>();
                    foreach (MoveAgent ma in agents)
                    {
                        ma._navAgent = nma;
                    }

                    return(model);
                }
                else
                {
                    Debug.LogError(string.Format("[CharacterAssembler] Model not found: \"{0}\"", ci.modelPath));
                }
            }
            else
            {
                Debug.LogError(string.Format("[CharacterAssembler] Agent path not found: \"{0}\"", ci.aiAgentPath));
            }
        }
        else
        {
            Debug.LogError(string.Format("[CharacterAssembler] Character id not found: \"{0}\"", data.characterId));
        }

        return(null);
    }
    public string get_Hotel_Booking(string jFDate, int cnt, string concat_data, string cls_val, int wiid)
    {
        StringBuilder hotel_data = new StringBuilder();
        string        dt         = string.Empty;
        string        IsValid    = string.Empty;

        try
        {
            DataSet dsData = (DataSet)ActionController.ExecuteAction("", "Travel_Request_Approval.aspx", "pgetrequestdata", ref IsValid, wiid);
            hotel_data.Append("<table id='tbl_hotelBooking' class='table table-striped table-bordered'>");
            hotel_data.Append("<thead><tr class='grey'><th style='width: 15%'>Date</th><th style='width: 15%'>Journey Type</th><th style='width: 15%'>Place Class</th><th style='width: 15%'>Room Type</th><th style='width: 15%'>Hotel Name</th><th style='width: 15%'>Contact No</th><th style='width: 15%; display:none'>Amount</th></tr></thead>");
            hotel_data.Append("<tbody>");

            string[] sp_data  = concat_data.Split('@');
            string[] cls_data = cls_val.Split('@');
            for (int i = 1; i <= cnt; i++)
            {
                for (int j = 1; j <= sp_data.Length - 1; j++)
                {
                    if (i == Convert.ToInt32(sp_data[j - 1]))
                    {
                        int row = Convert.ToInt32(j - 1);
                        dt = Convert.ToDateTime(jFDate).AddDays(i - 1).ToString("dd-MMM-yyyy");

                        hotel_data.Append("<tr>");
                        hotel_data.Append("<td><input class='form-control input-sm' type='text' name='htl' id='hotel_rno" + i + "' value=" + sp_data[j - 1] + " style='display:none'>" + dt + "</td>");
                        hotel_data.Append("<td>Outside Plant</td>");
                        hotel_data.Append("<td>");
                        hotel_data.Append("<span id='placeclass" + i + "'>" + cls_data[j - 1] + "</span> Class");
                        hotel_data.Append("</td>");
                        hotel_data.Append("<td>");
                        hotel_data.Append("<select ID='roomType" + i + "' class='form-control input-sm'  disabled>");
                        hotel_data.Append("<option value='0'>---Select One---</option>");
                        if (Convert.ToString(dsData.Tables[1].Rows[i - 1]["room_type"]).ToUpper() == "SINGLE BED OCCUPANCY")
                        {
                            hotel_data.Append("<option value='1' selected='true'>Single Bed Occupancy</option>");
                        }
                        else
                        {
                            hotel_data.Append("<option value='1'>Single Bed Occupancy</option>");
                        }

                        if (Convert.ToString(dsData.Tables[1].Rows[i - 1]["room_type"]).ToUpper() == "DOUBLE BED OCCUPANCY")
                        {
                            hotel_data.Append("<option value='2' selected='true'>Double Bed Occupancy</option></select>");
                        }
                        else
                        {
                            hotel_data.Append("<option value='2'>Double Bed Occupancy</option></select>");
                        }
                        hotel_data.Append("</td>");
                        hotel_data.Append("<td><input id='hotel_name" + i + "' class='form-control input-sm' type='text' value='" + Convert.ToString(dsData.Tables[1].Rows[i - 1]["hotel_name"]).Replace("'", "") + "' disabled></td>");
                        hotel_data.Append("<td><input id='hotel_no" + i + "' class='form-control input-sm' type='text' value='" + Convert.ToString(dsData.Tables[1].Rows[i - 1]["hotel_no"]).Replace("'", "") + "' disabled></td>");
                        hotel_data.Append("<td style='display:none'><input id='hotel_amount" + i + "' class='form-control input-sm' type='number' min='0' value='" + Convert.ToString(dsData.Tables[1].Rows[i - 1]["hotel_charge"]) + "' disabled></td>");
                        hotel_data.Append("</tr>");
                    }
                }
            }


            hotel_data.Append("</tbody></table>");
        }
        catch (Exception Exc) { FSL.Logging.Logger.WriteEventLog(false, Exc); }
        return(Convert.ToString(hotel_data));
    }
    public string get_Final_Data(string jFDate, string jTDate, int jr, string jt_data, string concat_data, string jt_val, string jt_amt, string to_city, string desg, int wiid, string travel_class_id, string plant_id)
    {
        StringBuilder hotel_data = new StringBuilder();
        string        dt         = string.Empty;
        string        is_data    = string.Empty;
        string        doa        = "";

        try
        {
            DataSet dsData = (DataSet)ActionController.ExecuteAction("", "Travel_Request_Approval.aspx", "pgetrequestdata", ref is_data, wiid);

            string[] j_type       = jt_data.Split('@');
            string[] j_val        = jt_val.Split('@');
            string[] row          = concat_data.Split('@');
            string[] h_amt        = jt_amt.Split('@');
            string[] pk_id        = to_city.Split('@');
            string[] travel_class = travel_class_id.Split('@');
            string[] travel_plant = plant_id.Split('@');
            string   ids          = "";
            for (int x = 0; x < j_val.Length - 1; x++)
            {
                if (j_val[x + 1] != "")
                {
                    ids += j_val[x] + ",";
                }
                else
                {
                    ids += j_val[x];
                }
            }

            DataTable ejm = (DataTable)ActionController.ExecuteAction("", "Travel_Request.aspx", "getexpenseids", ref is_data, ids);
            hotel_data.Append("<table id='tbl_hotelBooking' class='table table-striped table-bordered'>");
            hotel_data.Append("<thead>");
            hotel_data.Append("<tr class='grey' style='font-weight:bold'><th style='width:5%'>Date</th><th>Journey Type</th><th>Particulars</th>");
            if (ejm.Rows.Count > 0)
            {
                for (int y = 0; y < ejm.Rows.Count; y++)
                {
                    hotel_data.Append("<th><input type='text' id='compare_id" + (y + 1) + "' value='" + ejm.Rows[y]["COMPARE_ID"] + "' style='color:black; display:none'><input type='text' id='compare_name" + (y + 1) + "' value='" + Convert.ToString(ejm.Rows[y]["COMP_NAME"]).Replace(" ", "_") + "' style='color:black; display:none'><input type='text' name='eh' id='expenses" + (y + 1) + "' value='" + ejm.Rows[y]["FK_EXPENSE_HEAD"] + "' style='color:black; display:none'><input type='text' id='exp_name" + (y + 1) + "' value='" + ejm.Rows[y]["EXPENSE_HEAD"] + "' style='color:black; display:none'><input type='text' id='e_name" + (y + 1) + "' value='" + Convert.ToString(ejm.Rows[y]["EXPENSE_HEAD"]).Replace(" ", "_") + "' style='color:black; display:none'>" + ejm.Rows[y]["EXPENSE_HEAD"] + "</th>");
                }
            }
            hotel_data.Append("<th style='display:none'>Hotel Charge</th><th>Total</th></tr>");
            hotel_data.Append("</thead>");
            hotel_data.Append("<tbody>");


            for (int i = 1; i <= j_type.Length; i++)
            {
                dt = Convert.ToDateTime(jFDate).AddDays(i - 1).ToString("dd-MMM-yyyy");

                int journey_Type = Convert.ToInt32(j_val[i - 1]);

                string val = (string)ActionController.ExecuteAction("", "Travel_Request.aspx", "gettravelclass", ref is_data, pk_id[i - 1]);
                if (pk_id[i - 1] == "0")
                {
                    val = "A";
                }
                hotel_data.Append("<tr>");
                hotel_data.Append("<td>" + dt + "</td>");
                hotel_data.Append("<td>" + j_type[i - 1] + "</td>");
                hotel_data.Append("<td><input type='text' id='remark_note" + i + "' value='" + Convert.ToString(dsData.Tables[1].Rows[i - 1]["remark_note"]).Replace("'", "") + "' class='form-control input-sm' disabled></td>");
                string value = "0";
                if (ejm.Rows.Count > 0)
                {
                    for (int y = 0; y < ejm.Rows.Count; y++)
                    {
                        string cnt = (string)ActionController.ExecuteAction("", "Travel_Request.aspx", "getjmcount", ref is_data, j_val[i - 1], ejm.Rows[y]["FK_EXPENSE_HEAD"]);
                        value = (string)ActionController.ExecuteAction("", "Travel_Request.aspx", "getpolicyamount", ref is_data, desg, journey_Type, ejm.Rows[y]["FK_EXPENSE_HEAD"], "A", travel_class[i - 1], travel_plant[i - 1]);
                        string perc = (string)ActionController.ExecuteAction("", "Travel_Request.aspx", "getclasswiseperc", ref is_data, val);
                        //if (value !="" && val == "B")
                        //{
                        //    value = Convert.ToString(Convert.ToDouble(value)*85/100);
                        //}
                        //else if (value != "" && val == "C")
                        //{
                        //    value = Convert.ToString(Convert.ToDouble(value) * 70 / 100);
                        //}
                        if (value == "")
                        {
                            value = "0";
                        }
                        value = Convert.ToString(Convert.ToDouble(value) * Convert.ToDouble(perc) / 100);
                        DataTable dtamt = (DataTable)ActionController.ExecuteAction("", "Travel_Request_Approval.aspx", "getexpamount", ref is_data, Convert.ToString(dsData.Tables[0].Rows[0]["pk_travel_expense_hdr_id"]), dt, ejm.Rows[y]["FK_EXPENSE_HEAD"]);
                        string    iamt  = "0";
                        string    is_cr = "0";
                        if (dtamt != null)
                        {
                            if (dtamt.Rows.Count > 0)
                            {
                                iamt  = Convert.ToString(dtamt.Rows[0]["amount"]);
                                is_cr = Convert.ToString(dtamt.Rows[0]["IS_CR"]);
                            }
                        }

                        if (value != "")
                        {
                            if (Convert.ToDouble(value) < Convert.ToDouble(iamt))
                            {
                                doa = "1";
                            }
                        }
                        if (Convert.ToString(ejm.Rows[y]["IS_ALLOW"]) == "1" && cnt != "0")
                        {
                            if (is_cr == "0")
                            {
                                hotel_data.Append("<td><table><tr><td><input type='text' id='D_ALLOW_" + Convert.ToString(ejm.Rows[y]["EXPENSE_HEAD"]).Replace(" ", "_") + "_" + i + "_" + (y + 1) + "' value='" + Convert.ToString(ejm.Rows[y]["DIRECT_ALLOW"]) + "' style='display:none'><input type='checkbox' onchange='calculate_Amount();' id='IS_CR_" + Convert.ToString(ejm.Rows[y]["EXPENSE_HEAD"]).Replace(" ", "_") + "_" + i + "_" + (y + 1) + "' disabled></td><td><input type='number' min='0' id='" + Convert.ToString(ejm.Rows[y]["EXPENSE_HEAD"]).Replace(" ", "_") + "_" + i + "_" + (y + 1) + "' value='" + iamt + "' class='form-control input-sm' style='text-align:right; width:70px' onkeyup='calculate_Amount();' disabled><input type='number' min='0' id='h" + Convert.ToString(ejm.Rows[y]["EXPENSE_HEAD"]).Replace(" ", "_") + "_" + i + "_" + (y + 1) + "' value='" + value + "' class='form-control input-sm' style='text-align:right; display:none'></td></tr></table></td>");
                            }
                            else
                            {
                                hotel_data.Append("<td><table><tr><td><input type='text' id='D_ALLOW_" + Convert.ToString(ejm.Rows[y]["EXPENSE_HEAD"]).Replace(" ", "_") + "_" + i + "_" + (y + 1) + "' value='" + Convert.ToString(ejm.Rows[y]["DIRECT_ALLOW"]) + "' style='display:none'><input type='checkbox' onchange='calculate_Amount();' id='IS_CR_" + Convert.ToString(ejm.Rows[y]["EXPENSE_HEAD"]).Replace(" ", "_") + "_" + i + "_" + (y + 1) + "' checked='true' disabled></td><td><input type='number' min='0' id='" + Convert.ToString(ejm.Rows[y]["EXPENSE_HEAD"]).Replace(" ", "_") + "_" + i + "_" + (y + 1) + "' value='" + iamt + "' class='form-control input-sm' style='text-align:right; width:70px' onkeyup='calculate_Amount();' disabled><input type='number' min='0' id='h" + Convert.ToString(ejm.Rows[y]["EXPENSE_HEAD"]).Replace(" ", "_") + "_" + i + "_" + (y + 1) + "' value='" + value + "' class='form-control input-sm' style='text-align:right; display:none'></td></tr></table></td>");
                            }
                        }
                        else
                        {
                            if (value == "")
                            {
                                value = "0";
                            }
                            hotel_data.Append("<td><table><tr><td><input type='text' id='D_ALLOW_" + Convert.ToString(ejm.Rows[y]["EXPENSE_HEAD"]).Replace(" ", "_") + "_" + i + "_" + (y + 1) + "' value='" + Convert.ToString(ejm.Rows[y]["DIRECT_ALLOW"]) + "' style='display:none'><input type='checkbox' onchange='calculate_Amount();' id='IS_CR_" + Convert.ToString(ejm.Rows[y]["EXPENSE_HEAD"]).Replace(" ", "_") + "_" + i + "_" + (y + 1) + "' disabled></td><td><input type='number' min='0' id='" + Convert.ToString(ejm.Rows[y]["EXPENSE_HEAD"]).Replace(" ", "_") + "_" + i + "_" + (y + 1) + "' value='" + value + "' class='form-control input-sm' style='text-align:righ; width:70pxt' readonly><input type='number' min='0' id='h" + Convert.ToString(ejm.Rows[y]["EXPENSE_HEAD"]).Replace(" ", "_") + "_" + i + "_" + (y + 1) + "' value='" + value + "' class='form-control input-sm' style='text-align:right; width:70px; display:none'></td></tr></table></td>");
                        }
                    }
                }


                hotel_data.Append("<td style='text-align:right; display:none'><span id='Hotel_Charge" + i + "'>" + h_amt[i - 1] + "</span></td>");
                hotel_data.Append("<td style='text-align:right'><span id='Total" + i + "'>0</span></td>");
                hotel_data.Append("</tr>");
            }

            hotel_data.Append("<tr>");
            hotel_data.Append("<td colspan='" + (ejm.Rows.Count + 3) + "' style='text-align:right'><b>Final Amount : </b></td>");
            hotel_data.Append("<td style='text-align:right'><b><span id='Final_Amtt'>0</span></b></td>");
            hotel_data.Append("</tr>");
            hotel_data.Append("</tbody></table>");
        }
        catch (Exception Exc) { FSL.Logging.Logger.WriteEventLog(false, Exc); }
        return(Convert.ToString(hotel_data) + "||" + doa);
    }
    public string get_Journey_Data(string jFDate, string jTDate, int wiid)
    {
        string        jdata = string.Empty;
        DateTime      fdate = Convert.ToDateTime(jFDate);
        DateTime      tdate = Convert.ToDateTime(jTDate);
        StringBuilder html  = new StringBuilder();

        try
        {
            string  IsValid = string.Empty;
            DataSet dsData  = (DataSet)ActionController.ExecuteAction("", "Travel_Request_Approval.aspx", "pgetrequestdata", ref IsValid, wiid);

            int rno = 1;
            //while (fdate <= tdate)
            for (int from = 0; from < dsData.Tables[1].Rows.Count; from++)
            {
                html.Append("<tr>");
                html.Append("<td><input class='form-control input-sm' type='text' id='jrno" + rno + "' value=" + rno + " style='display:none'><span id='spn" + rno + "'><input class='form-control input-sm' type='text' id='jrny_date" + rno + "' value=" + Convert.ToDateTime(fdate).ToString("dd-MMM-yyyy") + " style='display:none'>" + Convert.ToDateTime(fdate).ToString("dd-MMM-yyyy") + "</span></td>");
                DataSet dtJourney = (DataSet)ActionController.ExecuteAction("", "Travel_Request.aspx", "select", ref IsValid);
                if (dtJourney.Tables[0] != null)
                {
                    html.Append("<td><select ID='journey_Type" + rno + "' runat='server' name='jt' class='form-control input-sm' onchange='check_journey_Type(" + rno + "," + dtJourney.Tables[0].Rows.Count + ")' disabled='true'>");
                    html.Append("<option Value='0'>---Select One---</option>");

                    for (int i = 0; i < dtJourney.Tables[0].Rows.Count; i++)
                    {
                        if (Convert.ToString(dtJourney.Tables[0].Rows[i]["PK_JOURNEY_ID"]) == Convert.ToString(dsData.Tables[1].Rows[from]["journey_type"]))
                        {
                            html.Append("<option Value='" + Convert.ToString(dtJourney.Tables[0].Rows[i]["PK_JOURNEY_ID"]) + "' selected='true'>" + Convert.ToString(dtJourney.Tables[0].Rows[i]["JOURNEY_TYPE"]) + "</option>");
                        }
                        else
                        {
                            html.Append("<option Value='" + Convert.ToString(dtJourney.Tables[0].Rows[i]["PK_JOURNEY_ID"]) + "'>" + Convert.ToString(dtJourney.Tables[0].Rows[i]["JOURNEY_TYPE"]) + "</option>");
                        }
                    }
                    html.Append("</select></td>");
                }

                if (dtJourney.Tables[1] != null)
                {
                    html.Append("<td class='modetravel'>");
                    html.Append("<select ID='Travel_Mode" + rno + "' runat='server' class='form-control input-sm' style='display:normal' disabled>");
                    html.Append("<option Value='0'>---Select One---</option>");

                    for (int i = 0; i < dtJourney.Tables[1].Rows.Count; i++)
                    {
                        if (Convert.ToString(dtJourney.Tables[1].Rows[i]["PK_TRAVEL_ID"]) == Convert.ToString(dsData.Tables[1].Rows[from]["travel_mode"]))
                        {
                            html.Append("<option Value='" + Convert.ToString(dtJourney.Tables[1].Rows[i]["PK_TRAVEL_ID"]) + "' selected='true'>" + Convert.ToString(dtJourney.Tables[1].Rows[i]["TRAVEL_NAME"]) + "</option>");
                        }
                        else
                        {
                            html.Append("<option Value='" + Convert.ToString(dtJourney.Tables[1].Rows[i]["PK_TRAVEL_ID"]) + "'>" + Convert.ToString(dtJourney.Tables[1].Rows[i]["TRAVEL_NAME"]) + "</option>");
                        }
                    }
                    html.Append("</select>");

                    html.Append("<select ID='From_Plant" + rno + "' runat='server' class='form-control input-sm' style='display:normal' disabled>");
                    html.Append("<option Value='0'>---Select One---</option>");

                    for (int i = 0; i < dtJourney.Tables[3].Rows.Count; i++)
                    {
                        if (Convert.ToString(dtJourney.Tables[3].Rows[i]["PK_TRAVEL_PLANT_ID"]) == Convert.ToString(dsData.Tables[1].Rows[from]["plant_from"]))
                        {
                            html.Append("<option Value='" + Convert.ToString(dtJourney.Tables[3].Rows[i]["PK_TRAVEL_PLANT_ID"]) + "' selected='true'>" + Convert.ToString(dtJourney.Tables[3].Rows[i]["PLANT_NAME"]) + "</option>");
                        }
                        else
                        {
                            html.Append("<option Value='" + Convert.ToString(dtJourney.Tables[3].Rows[i]["PK_TRAVEL_PLANT_ID"]) + "'>" + Convert.ToString(dtJourney.Tables[3].Rows[i]["PLANT_NAME"]) + "</option>");
                        }
                    }
                    html.Append("</select>");

                    html.Append("<select ID='default_From" + rno + "' runat='server' class='form-control input-sm' disabled>");
                    html.Append("<option Value='0'>---Select One---</option>");
                    html.Append("</select>");

                    html.Append("</td>");
                }

                if (dtJourney.Tables[2] != null)
                {
                    html.Append("<td class='modetravel'>");
                    html.Append("<select ID='Travel_Class" + rno + "' runat='server' class='form-control input-sm' style='display:normal' disabled>");
                    html.Append("<option Value='0'>---Select One---</option>");

                    DataTable dtClass = (DataTable)ActionController.ExecuteAction("", "Travel_Request.aspx", "pgettravelclass", ref IsValid, Convert.ToString(dsData.Tables[1].Rows[from]["travel_mode"]));

                    for (int i = 0; i < dtClass.Rows.Count; i++)
                    {
                        if (Convert.ToString(dtClass.Rows[i]["PK_TRAVEL_MAPPING_ID"]) == Convert.ToString(dsData.Tables[1].Rows[from]["travel_class"]))
                        {
                            html.Append("<option Value='" + Convert.ToString(dtClass.Rows[i]["PK_TRAVEL_MAPPING_ID"]) + "' selected='true'>" + Convert.ToString(dtClass.Rows[i]["TRAVEL_MAPPING_CLASS"]) + "</option>");
                        }
                        else
                        {
                            html.Append("<option Value='" + Convert.ToString(dtClass.Rows[i]["PK_TRAVEL_MAPPING_ID"]) + "'>" + Convert.ToString(dtClass.Rows[i]["TRAVEL_MAPPING_CLASS"]) + "</option>");
                        }
                    }
                    html.Append("</select>");

                    html.Append("<select ID='To_Plant" + rno + "' runat='server' class='form-control input-sm' style='display:normal' disabled>");
                    html.Append("<option Value='0'>---Select One---</option>");

                    for (int i = 0; i < dtJourney.Tables[3].Rows.Count; i++)
                    {
                        if (Convert.ToString(dtJourney.Tables[3].Rows[i]["PK_TRAVEL_PLANT_ID"]) == Convert.ToString(dsData.Tables[1].Rows[from]["plant_to"]))
                        {
                            html.Append("<option Value='" + Convert.ToString(dtJourney.Tables[3].Rows[i]["PK_TRAVEL_PLANT_ID"]) + "' selected='true'>" + Convert.ToString(dtJourney.Tables[3].Rows[i]["PLANT_NAME"]) + "</option>");
                        }
                        else
                        {
                            html.Append("<option Value='" + Convert.ToString(dtJourney.Tables[3].Rows[i]["PK_TRAVEL_PLANT_ID"]) + "'>" + Convert.ToString(dtJourney.Tables[3].Rows[i]["PLANT_NAME"]) + "</option>");
                        }
                    }
                    html.Append("</select>");

                    html.Append("<select ID='default_To" + rno + "' runat='server' class='form-control input-sm' disabled>");
                    html.Append("<option Value='0'>---Select One---</option>");
                    html.Append("</select>");

                    html.Append("</td>");
                }

                if (dtJourney.Tables[5] != null)
                {
                    html.Append("<td><select ID='From_City" + rno + "' runat='server' class='form-control input-sm' onchange='chk_class_From(" + rno + ")' disabled>");
                    html.Append("<option Value='0'>---Select One---</option>");

                    for (int i = 0; i < dtJourney.Tables[5].Rows.Count; i++)
                    {
                        if (Convert.ToString(dtJourney.Tables[5].Rows[i]["PK_CITY_ID"]) == Convert.ToString(dsData.Tables[1].Rows[from]["from_city"]))
                        {
                            html.Append("<option Value='" + Convert.ToString(dtJourney.Tables[5].Rows[i]["PK_CITY_ID"]) + "' selected='true'>" + Convert.ToString(dtJourney.Tables[5].Rows[i]["NAME"]) + "</option>");
                        }
                        else
                        {
                            html.Append("<option Value='" + Convert.ToString(dtJourney.Tables[5].Rows[i]["PK_CITY_ID"]) + "'>" + Convert.ToString(dtJourney.Tables[5].Rows[i]["NAME"]) + "</option>");
                        }
                    }

                    if (Convert.ToString(dsData.Tables[1].Rows[from]["from_city"]) != "-1")
                    {
                        html.Append("<option Value='-1'>Other</option>");
                        html.Append("</select><input type='text' class='form-control input-sm' id='txt_f_city" + rno + "' style='display:none' disabled></td>");
                    }
                    else
                    {
                        html.Append("<option Value='-1' selected='true'>Other</option>");
                        html.Append("</select><input type='text' class='form-control input-sm' id='txt_f_city" + rno + "' value='" + Convert.ToString(dsData.Tables[1].Rows[from]["other_f_city"]).Replace("'", "") + "' style='display:normal' disabled></td>");
                    }

                    html.Append("<td><select ID='To_City" + rno + "' runat='server' class='form-control input-sm' onchange='chk_class_To(" + rno + ")' disabled>");
                    html.Append("<option Value='0'>---Select One---</option>");

                    for (int i = 0; i < dtJourney.Tables[5].Rows.Count; i++)
                    {
                        if (Convert.ToString(dtJourney.Tables[5].Rows[i]["PK_CITY_ID"]) == Convert.ToString(dsData.Tables[1].Rows[from]["to_city"]))
                        {
                            html.Append("<option Value='" + Convert.ToString(dtJourney.Tables[5].Rows[i]["PK_CITY_ID"]) + "' selected='true'>" + Convert.ToString(dtJourney.Tables[5].Rows[i]["NAME"]) + "</option>");
                        }
                        else
                        {
                            html.Append("<option Value='" + Convert.ToString(dtJourney.Tables[5].Rows[i]["PK_CITY_ID"]) + "'>" + Convert.ToString(dtJourney.Tables[5].Rows[i]["NAME"]) + "</option>");
                        }
                    }
                    string CLASSIFICATION = Convert.ToString(dsData.Tables[1].Rows[from]["CLASSIFICATION"]);
                    if (Convert.ToString(dsData.Tables[1].Rows[from]["to_city"]) != "-1")
                    {
                        html.Append("<option Value='-1'>Other</option>");
                        html.Append("</select><input type='text' id='cls" + rno + "' value='" + CLASSIFICATION + "' style='display:none'><input type='text' class='form-control input-sm' id='txt_t_city" + rno + "' style='display:none' disabled></td>");
                    }
                    else
                    {
                        html.Append("<option Value='-1' selected='true'>Other</option>");
                        html.Append("</select><input type='text' id='cls" + rno + "' value='" + CLASSIFICATION + "' style='display:none'><input type='text' class='form-control input-sm' id='txt_t_city" + rno + "' value='" + Convert.ToString(dsData.Tables[1].Rows[from]["other_t_city"]).Replace("'", "") + "' style='display:normal' disabled></td>");
                    }
                }

                html.Append("</tr>");
                rno   = rno + 1;
                fdate = fdate.AddDays(1);
            }

            jdata = Convert.ToString(html);
        }
        catch (Exception Exc) { FSL.Logging.Logger.WriteEventLog(false, Exc); }
        return(jdata);
    }
Exemple #16
0
    public string fillVendor(string po_no, string vendor_name)
    {
        string        DisplayData = string.Empty;
        string        isValid     = string.Empty;
        StringBuilder HTML        = new StringBuilder();

        if (!ActionController.IsSessionExpired(this, true))
        {
            try
            {
                DataTable dt = (DataTable)ActionController.ExecuteAction("", "Vendor_Advance_Request.aspx", "getheader", ref isValid, vendor_name, po_no);
                HTML.Append("<table id='tble' class='table table-bordered'><thead><tr class='grey'><th>PO No</th><th>Date</th><th>Currency</th><th>Created By</th><th>PO Type</th><th>INCO Terms</th><th>PO Value</th><th>Tax</th><th>PO GV</th><th>Advance Amount</th><th>Payment Terms</th></tr></thead>");
                HTML.Append("<tbody>");
                if (dt != null && dt.Rows.Count > 0)
                {
                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        string encrypt_Str = crypt.Encryptdata(Convert.ToString(dt.Rows[i]["PO_Number"]));

                        HTML.Append("<tr class='demo1'><td class='hidden'><input class='form-control' id='txt_Vendor_Name' type='text' value=" + dt.Rows[i]["VENDOR_NAME"].ToString() + "></td>");
                        HTML.Append("<td class='hidden'><input class='form-control' id='txt_Vendor_Code' type='text' value=" + dt.Rows[i]["VENDOR_CODE"].ToString() + "></td>");
                        HTML.Append("<td><a href='#po_number' data-toggle='modal' onclick='viewData(" + (i + 1) + ")'>" + dt.Rows[i]["PO_NUMBER"].ToString() + "<input type='text' id='encrypt_po_" + (i + 1) + "' value=" + encrypt_Str + " style='display:none'></td>");
                        HTML.Append("<td class='hidden'><input class='form-control' id='txt_PO_Number' type='text' value=" + dt.Rows[i]["PO_NUMBER"].ToString() + "></td>");
                        HTML.Append("<td><input class='hidden' id='txt_PO_Date' type='text' value=" + dt.Rows[i]["PO_Date"].ToString() + ">" + dt.Rows[i]["PO_Date"].ToString() + "</td>");
                        HTML.Append("<td><input class='hidden' id='txt_PO_Currency' type='text' value=" + dt.Rows[i]["CURRENCY"].ToString() + ">" + dt.Rows[i]["CURRENCY"].ToString() + "</td>");
                        HTML.Append("<td><input class='hidden' id='txt_PO_Created_By' type='text' value=" + dt.Rows[i]["CREATED_BY"].ToString() + ">" + dt.Rows[i]["CREATED_BY"].ToString() + "</td>");
                        if (dt.Rows[i]["PO_Type"].ToString() == "9")
                        {
                            HTML.Append("<td><input class='hidden' id='txt_PO_Type' value='Service PO'>Service PO</td>");
                        }
                        else
                        {
                            HTML.Append("<td><input class='hidden' id='txt_PO_Type' value='Material PO'>Material PO</td>");
                        }
                        HTML.Append("<td><input class='hidden' id='txt_PO_Inco' type='text' value=" + dt.Rows[i]["INCO"].ToString() + ">" + dt.Rows[i]["INCO"].ToString() + "</td>");
                        HTML.Append("<td style='text-align:right'><input class='hidden' id='txt_PO_Value' type='text' value=" + dt.Rows[i]["PO_VALUE"].ToString() + ">" + dt.Rows[i]["PO_VALUE"].ToString() + "</td>");
                        HTML.Append("<td style='text-align:right'><input class='hidden' id='txt_tax' type='text' value=" + dt.Rows[i]["Tax"].ToString() + ">" + dt.Rows[i]["Tax"].ToString() + "</td>");
                        HTML.Append("<td style='text-align:right'>" + dt.Rows[i]["PO_GV"].ToString() + "</td>");
                        HTML.Append("<td style='text-align:right'><input class='hidden' id='txt_Cumu_Amount' type='text' value=" + dt.Rows[i]["Cumu_Amount"].ToString() + ">" + dt.Rows[i]["Cumu_Amount"].ToString() + "</td>");
                        HTML.Append("<td class='hidden'><input class='form-control' id='txt_PO_GV' type='text' value=" + dt.Rows[i]["PO_GV"].ToString() + "></td>");
                        HTML.Append("<td><input class='hidden' id='txt_Payment_terms' type='text' value=" + dt.Rows[i]["PAYMENT_TERMS"].ToString() + ">" + dt.Rows[i]["PAYMENT_TERMS"].ToString() + "</td>");
                        HTML.Append("<td class='hidden'><input class='form-control' id='txt_Item_Category' type='text' value=" + dt.Rows[i]["PO_Type"].ToString() + "></td>");
                        HTML.Append("<td class='hidden'><input class='form-control' id='txt_Advance_PO' type='text' value=" + dt.Rows[i]["DPTYP"].ToString() + "></td>");
                        HTML.Append("<td class='hidden'><input class='form-control' id='txt_Advance_PO_Amount' type='text' value=" + dt.Rows[i]["DPAMT"].ToString() + "></td>");
                        HTML.Append("<td class='hidden'><input class='form-control' id='txt_Advance_Amount_Date' type='text' value=" + dt.Rows[i]["DPDAT"].ToString() + "></td>");
                        HTML.Append("</tr>");
                    }
                }
                HTML.Append("</tbody>");
                HTML.Append("</table>");
                //txt_VendorName.Text = dt.Rows[0]["VENDOR_NAME"].ToString();
            }

            catch (Exception ex)
            {
                FSL.Logging.Logger.WriteEventLog(false, ex);
            }
        }

        DisplayData = HTML.ToString();
        return(DisplayData);
    }
Exemple #17
0
    public string[] getComplianceDetails(int Cat_ID, int Compliance_ID)
    {
        int m = 0;
        int n = 0;

        string[]      ResultData   = null;
        string        isdata       = string.Empty;
        int           Before_Count = 0;
        int           After_Count  = 0;
        StringBuilder Before_Data  = new StringBuilder();
        StringBuilder After_Data   = new StringBuilder();

        if (!ActionController.IsSessionExpired(this, true))
        {
            ResultData = new string[3];
            try
            {
                DataTable Comp_Dtl = (DataTable)ActionController.ExecuteAction("", "Compliance_Mail.aspx", "psearch", ref isdata, Compliance_ID, "", "", "3", Cat_ID);
                if (Comp_Dtl.Rows.Count > 0)
                {
                    for (int i = 0; i < Comp_Dtl.Rows.Count; i++)
                    {
                        if (Comp_Dtl.Rows[i]["MAIL_CATEGORY"].ToString() == "Before")
                        {
                            Before_Count++;
                        }
                        else
                        {
                            After_Count++;
                        }
                    }
                    if (Before_Count > 0)
                    {
                        Before_Data.Append("<table id='tbl_Before' style='width:70%' class='table table-bordered table-hover'>");
                        Before_Data.Append("<thead>");
                        Before_Data.Append("<tr class='grey'>");
                        Before_Data.Append("<th>Add</th><th>Delete</th><th>Days</th><th>To Client</th><th>Email Type</th></tr></thead><tbody>");
                        for (int i = 0; i < Comp_Dtl.Rows.Count; i++)
                        {
                            if (Comp_Dtl.Rows[i]["MAIL_CATEGORY"].ToString() == "Before")
                            {
                                Before_Data.Append(" <tr>");
                                Before_Data.Append("<td  width='2%'><img id=Be_add" + (m + 1) + "     src='/Sudarshan-Portal/Img/MoveUp.GIF'  onclick=newRow('Before') alt='Click here to Add New Row.' /></td>");
                                Before_Data.Append("<td  width='3%'><img id=Be_delete" + (m + 1) + "  src='/Sudarshan-Portal/Img/button_cancel.png' onclick=DeleteRow('Before'," + (m + 1) + ") alt='Click here to Delete Row.' /></td>");
                                Before_Data.Append("<td  width='8%'><input type='text' onkeyup='return chknumeric(this.id);'   id=txt_BeDays" + (m + 1) + " value=" + (Comp_Dtl.Rows[i]["DAYS"].ToString()) + "  class='form-control input-md'/></td>");
                                Before_Data.Append("<td  width='15%'><select name='select' id=ddl_BeLevels" + (m + 1) + "  class='form-control input-md' >" + getBeforeLevels(Comp_Dtl.Rows[i]["FK_LEVEL_ID"].ToString()) + "</select></td>");
                                Before_Data.Append("<td  width='15%'><select name='select' id=ddl_BeEmail_Type" + (m + 1) + "  class='form-control input-md' >" + getBeforeEmails(Comp_Dtl.Rows[i]["FK_EMAIL_TYPE"].ToString()) + "</select></td>");
                                Before_Data.Append("</tr>");
                                m++;
                            }
                        }
                        Before_Data.Append("   </tbody>   </table> ");
                    }
                    if (After_Count > 0)
                    {
                        After_Data.Append("<table id='tbl_After' style='width:70%' class='table table-bordered table-hover'>");
                        After_Data.Append("<thead>");
                        After_Data.Append("<tr class='grey'>");
                        After_Data.Append("<th>Add</th><th>Delete</th><th>Days</th><th>To Client</th><th>Email Type</th></tr></thead><tbody>");
                        for (int i = 0; i < Comp_Dtl.Rows.Count; i++)
                        {
                            if (Comp_Dtl.Rows[i]["MAIL_CATEGORY"].ToString() == "After")
                            {
                                After_Data.Append(" <tr>");
                                After_Data.Append("<td  width='2%'><img id=Af_add" + (n + 1) + "     src='/Sudarshan-Portal/Img/MoveUp.GIF'  onclick=newRow('After') alt='Click here to Add New Row.' /></td>");
                                After_Data.Append("<td  width='3%'><img id=Af_delete" + (n + 1) + "  src='/Sudarshan-Portal/Img/button_cancel.png' onclick=DeleteRow('After'," + (n + 1) + ") alt='Click here to Delete Row.' /></td>");
                                After_Data.Append("<td  width='8%'><input type='text'  onkeyup='return chknumeric(this.id);'  id=txt_Af_Days" + (n + 1) + " value=" + (Comp_Dtl.Rows[i]["DAYS"].ToString()) + " class='form-control input-md'/></td>");
                                After_Data.Append("<td  width='15%'><select name='select' id=ddl_AfLevels" + (n + 1) + "  class='form-control input-md' >" + getBeforeLevels(Comp_Dtl.Rows[i]["FK_LEVEL_ID"].ToString()) + "</select></td>");
                                After_Data.Append("<td  width='15%'><select name='select' id=ddl_AfEmailType" + (n + 1) + "  class='form-control input-md' >" + getBeforeEmails(Comp_Dtl.Rows[i]["FK_EMAIL_TYPE"].ToString()) + "</select></td>");
                                After_Data.Append("</tr>");
                                n++;
                            }
                        }
                        After_Data.Append("   </tbody>   </table> ");
                    }
                }
                else
                {
                    Before_Data.Append("<table id='tbl_Before' style='width:70%' class='table table-bordered table-hover'>");
                    Before_Data.Append("<thead>");
                    Before_Data.Append("<tr class='grey'>");
                    Before_Data.Append("<th>Add</th><th>Delete</th><th>Days</th><th>To Client</th><th>Email Type</th></tr></thead><tbody>");
                    Before_Data.Append(" <tr>");
                    Before_Data.Append("<td  width='2%'><img id=Be_add1     src='/Sudarshan-Portal/Img/MoveUp.GIF'  onclick=newRow('Before') alt='Click here to Add New Row.' /></td>");
                    Before_Data.Append("<td  width='3%'><img id=Be_delete1 src='/Sudarshan-Portal/Img/button_cancel.png' onclick=DeleteRow('Before','1') alt='Click here to Delete Row.' /></td>");
                    Before_Data.Append("<td  width='8%'><input type='text'  onkeyup='return chknumeric(this.id);'  id=txt_BeDays1 value=''  class='form-control input-md'/></td>");
                    Before_Data.Append("<td  width='15%'><select name='select' id=ddl_BeLevels1  class='form-control input-md' >" + getBLevels() + "</select></td>");
                    Before_Data.Append("<td  width='15%'><select name='select' id=ddl_BeEmail_Type1  class='form-control input-md' >" + getBEmails() + "</select></td>");
                    Before_Data.Append("</tr>");
                    Before_Data.Append("</tbody></table> ");

                    After_Data.Append("<table id='tbl_After' style='width:70%' class='table table-bordered table-hover'>");
                    After_Data.Append("<thead>");
                    After_Data.Append("<tr class='grey'>");
                    After_Data.Append("<th>Add</th><th>Delete</th><th>Days</th><th>To Client</th><th>Email Type</th></tr></thead><tbody>");
                    After_Data.Append(" <tr>");
                    After_Data.Append("<td  width='2%'><img id=Af_add1     src='/Sudarshan-Portal/Img/MoveUp.GIF'  onclick=newRow('After') alt='Click here to Add New Row.' /></td>");
                    After_Data.Append("<td  width='3%'><img id=Af_delete1  src='/Sudarshan-Portal/Img/button_cancel.png' onclick=DeleteRow('Before','1') alt='Click here to Delete Row.' /></td>");
                    After_Data.Append("<td  width='8%'><input type='text'   onkeyup='return chknumeric(this.id);' id=txt_Af_Days1 value='' class='form-control input-md'/></td>");
                    After_Data.Append("<td  width='15%'><select name='select' id=ddl_AfLevels1 class='form-control input-md' >" + getBLevels() + "</select></td>");
                    After_Data.Append("<td  width='15%'><select name='select' id=ddl_AfEmailType1  class='form-control input-md' >" + getBEmails() + "</select></td>");
                    After_Data.Append("</tr>");
                    After_Data.Append("   </tbody>   </table> ");
                }
            }
            catch (Exception ex)
            {
                FSL.Logging.Logger.WriteEventLog(false, ex);
            }
        }
        ResultData[0] = Convert.ToString(Before_Data);
        ResultData[1] = Convert.ToString(After_Data);
        return(ResultData);
    }
 void Setup()
 {
     if (actionController == null)
     {
         actionController = GetComponentInChildren<ActionController> ();
     }
 }
    protected void btnReject_Click(object sender, EventArgs e)
    {
        try
        {
            ActionController.DisablePageCaching(this);
            if (ActionController.IsSessionExpired(this))
            {
                ActionController.RedirctToLogin(this);
            }
            else
            {
                string   refData  = string.Empty;
                string   data     = split_data.Text;
                string[] sp_data  = data.Split('@');
                string[] ven_data = mail_data.Text.Split('|');
                int      succeed  = 0;
                for (int i = 0; i < sp_data.Length; i++)
                {
                    Init_Email.Text = txtEmailID.Text;
                    string[] row_data = sp_data[i].Split('$');
                    txt_Dispatch.Text  = Convert.ToString(row_data[0]);
                    txtProcessID.Text  = Convert.ToString(row_data[1]);
                    txtInstanceID.Text = Convert.ToString(row_data[2]);
                    txtWIID.Text       = Convert.ToString(row_data[3]);
                    txt_Request.Text   = Convert.ToString(row_data[4]);
                    txt_Username.Text  = Convert.ToString(Session["USER_ADID"]);

                    DataTable dtV = (DataTable)ActionController.ExecuteAction("", "Edit_Profile.aspx", "getvendordetails", ref refData, ven_data[i]);
                    if (dtV != null)
                    {
                        if (dtV.Rows.Count > 0)
                        {
                            Init_Email.Text = Convert.ToString(dtV.Rows[0]["Email"]).Trim();
                        }
                    }


                    string isInserted = string.Empty;
                    string ISValid    = string.Empty;
                    txt_Condition.Text = "3";
                    string remark = string.Empty;
                    //string isSaved = "true";
                    string isSaved = (string)ActionController.ExecuteAction("", "Early_Payment_Request_Approval.aspx", "update", ref refData, Convert.ToInt32(txt_Condition.Text), txt_Dispatch.Text, txt_Username.Text);
                    if (isSaved == null || refData.Length > 0 || isSaved == "false")
                    {
                        string[] errmsg = refData.Split(':');
                        Page.RegisterStartupScript("onclick", "<script language='javascript'>{alert('" + errmsg[0].ToString() + "');}</script>");
                    }
                    else
                    {
                        string[] Dval = new string[1];
                        Dval[0] = "";
                        bool isCreate = (bool)WFE.Action.ReleaseStep(txtProcessID.Text, txtInstanceID.Text, "105", "EARLY PAYMENT REQUEST APPROVAL", "REJECT", txt_Username.Text, txt_Username.Text.Trim(), "", "", "", "", "", "", "", "", "", "", Dval, txt_Request.Text, txtWIID.Text, ref isInserted);
                        //bool isCreate = true;
                        if (isCreate)
                        {
                            succeed = succeed + 1;
                            try
                            {
                                string auditid = (string)ActionController.ExecuteAction(txt_Username.Text, "Early_Payment_Request.aspx", "insertaudittrail", ref isInserted, txtProcessID.Text, txtInstanceID.Text, "EARLY PAYMENT REQUEST APPROVAL", "USER", txt_Username.Text, "SUBMIT", remark, "0", "0");

                                string uniqueno = (string)ActionController.ExecuteAction(txt_Username.Text, "Early_Payment_Request.aspx", "getuniqueno", ref isInserted, txt_Dispatch.Text);

                                string    pono  = (string)ActionController.ExecuteAction(txt_Username.Text, "Early_Payment_Request_Approval_Multiple.aspx", "getpono", ref isInserted, txt_Dispatch.Text);
                                DataTable db    = (DataTable)ActionController.ExecuteAction("", "PODispatchDeatails.aspx", "getmailid", ref isInserted, pono);
                                string[]  Dval1 = new string[db.Rows.Count];
                                Dval1[0] = "";
                                string mailid = "";
                                if (db != null)
                                {
                                    if (db.Rows.Count > 0)
                                    {
                                        for (int l = 0; l < db.Rows.Count; l++)
                                        {
                                            if (mailid == "")
                                            {
                                                mailid = Convert.ToString(db.Rows[l]["SMTP_ADDR"]);
                                            }
                                            else
                                            {
                                                mailid = mailid + ',' + Convert.ToString(db.Rows[l]["SMTP_ADDR"]);
                                            }
                                        }
                                    }
                                }
                                mailid = Init_Email.Text + mailid;

                                string msg = "<pre><font size='3'>Dear Sir/Madam,</font></pre><pre><font size='3'>The Early Payment Request has been Rejected.</font></pre><pre><font size='3'>Unique No: " + uniqueno + "</font></pre> <pre><font size='3'>Dispatch No: " + txt_Request.Text + "</font></pre><pre><font size='3'>Rejected By: " + txt_Username.Text.Trim() + "</font></pre><pre>INTRANET URL:http://" + compname + "/Sudarshan-Portal/Login.aspx</pre><pre>INTERNET URL:https://" + compname + "/Sudarshan-Portal/Login.aspx</pre><br/><pre>Regards</pre><pre>Reporting Admin</pre><pre><font size='3'  color='red'><i><b>This is a system generated message. We request you not to reply to this message.</b></i></font></pre>";

                                //string msg = "<pre><font size='3'>Dear Sir/Madam,</font></pre><p/> <pre><font size='3'>The Early Payment Request has been Rejected.</font></pre><p/> <pre><font size='3'>Unique No: " + uniqueno + "</font></pre> <pre><font size='3'>Dispatch No: " + txt_Request.Text + "</font></pre><pre><font size='3'>Created By: " + txt_Username.Text.Trim() + "</font></pre></p><pre></b><pre>INTRANET URL:http://" + compname + "/Sudarshan-Portal/Login.aspx</pre><pre>INTERNET URL:https://" + compname + "/Sudarshan-Portal/Login.aspx</pre><br/><pre>Regards</pre><pre><b>Reporting Admin<b></pre><br/><pre></pre><br/><pre><font size='3'  color='red'><i><b>This is a system generated message. We request you not to reply to this message.</b></i></font></pre>";
                                string emailid = (string)ActionController.ExecuteAction(txt_Username.Text, "Early_Payment_Request.aspx", "insetmaildata", ref isInserted, txtProcessID.Text, txtInstanceID.Text, 0, "EARLY_PAYMENT_REQUEST", "SUBMIT", Init_Email.Text, txtEmailID.Text, msg, "Dispatch No: " + txt_Request.Text);
                            }
                            catch (Exception ex)
                            {
                                // throw;
                                FSL.Logging.Logger.WriteEventLog(false, ex);
                            }
                            finally
                            {
                                //Page.RegisterStartupScript("onclick", "<script language='javascript'>{alert('Early Payment Request has been Rejected...!');window.open('../../Portal/SCIL/Home.aspx','frmset_WorkArea');}</script>");
                            }
                        }
                    }
                }
                Page.RegisterStartupScript("onclick", "<script language='javascript'>{alert('" + succeed + " out of " + sp_data.Length + " - Early Payment Request has been Rejected...!');window.open('../../Portal/SCIL/Home.aspx','frmset_WorkArea');}</script>");
            }
        }
        catch (Exception ex)
        {
            FSL.Logging.Logger.WriteEventLog(false, ex);
        }
    }
 void onTriggerExit(Collider col)
 {
     attackWillLand = false;
     targetObj = null;
     otherCharClass = null;
     otherActionController = null;
 }
Exemple #21
0
    protected void btnReject_Click(object sender, EventArgs e)
    {
        try
        {
            ActionController.DisablePageCaching(this);
            if (ActionController.IsSessionExpired(this))
            {
                ActionController.RedirctToLogin(this);
            }
            else
            {
                string refData    = string.Empty;
                string isInserted = string.Empty;
                string ISValid    = string.Empty;
                txt_Condition.Text = "3";
                string remark  = txt_Remark.Text;
                string isSaved = (string)ActionController.ExecuteAction("", "Early_Payment_Request_Approval.aspx", "update", ref refData, Convert.ToInt32(txt_Condition.Text), txt_Dispatch.Text, txt_Username.Text);
                if (isSaved == null || refData.Length > 0 || isSaved == "false")
                {
                    string[] errmsg = refData.Split(':');
                    Page.RegisterStartupScript("onclick", "<script language='javascript'>{alert('" + errmsg[0].ToString() + "');}</script>");
                }
                else
                {
                    string[] Dval = new string[1];
                    Dval[0] = "";
                    bool isCreate = (bool)WFE.Action.ReleaseStep(txtProcessID.Text, txtInstanceID.Text, "105", "EARLY PAYMENT REQUEST APPROVAL", "REJECT", txt_Username.Text, txt_Username.Text.Trim(), "", "", "", "", "", "", "", "", "", "", Dval, txt_Request.Text, txtWIID.Text, ref isInserted);
                    if (isCreate)
                    {
                        try
                        {
                            string auditid  = (string)ActionController.ExecuteAction(txt_Username.Text, "Early_Payment_Request.aspx", "insertaudittrail", ref isInserted, txtProcessID.Text, txtInstanceID.Text, "EARLY PAYMENT REQUEST APPROVAL", "USER", txt_Username.Text, "SUBMIT", remark, "0", "0");
                            string mail     = "https://esp.sudarshan.com/Sudarshan-Portal/Login.aspx";
                            string uniqueno = (string)ActionController.ExecuteAction(txt_Username.Text, "Early_Payment_Request.aspx", "getuniqueno", ref isInserted, txt_Dispatch.Text);
                            string msg      = "<pre><font size='3'>Dear Sir/Madam,</font></pre><pre><font size='3'>The Early Payment Request has been Rejected.</font></pre><pre><font size='3'>Unique No: " + uniqueno + "</font></pre> <pre><font size='3'>Dispatch No: " + txt_Request.Text + "</font></pre><pre><font size='3'>Rejected By: " + txt_Username.Text.Trim() + "</font></pre><pre>INTERNET URL:<a data-cke-saved-href={" + mail + "} href={" + mail + "}>" + mail + "</a></font></pre></br><pre>Regards</pre><pre>Reporting Admin</pre><pre><font size='3'  color='red'><i><b>This is a system generated message. We request you not to reply to this message.</b></i></font></pre>";

                            DataTable db    = (DataTable)ActionController.ExecuteAction("", "PODispatchDeatails.aspx", "getmailid", ref isInserted, txt_PO.Text);
                            string[]  Dval1 = new string[db.Rows.Count];
                            Dval1[0] = "";
                            string mailid = "";
                            if (db != null)
                            {
                                if (db.Rows.Count > 0)
                                {
                                    for (int l = 0; l < db.Rows.Count; l++)
                                    {
                                        if (mailid == "")
                                        {
                                            mailid = Convert.ToString(db.Rows[l]["SMTP_ADDR"]);
                                        }
                                        else
                                        {
                                            mailid = mailid + ',' + Convert.ToString(db.Rows[l]["SMTP_ADDR"]);
                                        }
                                    }
                                }
                            }
                            mailid = Init_Email.Text + mailid;

                            string emailid = (string)ActionController.ExecuteAction(txt_Username.Text, "Early_Payment_Request.aspx", "insetmaildata", ref isInserted, txtProcessID.Text, txtInstanceID.Text, 0, "EARLY_PAYMENT_REQUEST", "SUBMIT", Init_Email.Text, txtEmailID.Text, msg, "Dispatch No: " + txt_Request.Text);
                        }
                        catch (Exception ex)
                        {
                            // throw;
                            FSL.Logging.Logger.WriteEventLog(false, ex);
                        }
                        finally
                        {
                            Page.RegisterStartupScript("onclick", "<script language='javascript'>{alert('Early Payment Request has been Rejected...!');window.open('../../Portal/SCIL/Home.aspx','frmset_WorkArea');}</script>");
                        }
                    }
                }
            }
        }
        catch (Exception ex)
        {
            FSL.Logging.Logger.WriteEventLog(false, ex);
        }
    }
    protected void btn_AckOnClick(object sender, System.EventArgs e)
    {
        if (ActionController.IsSessionExpired(Page))
        {
            ActionController.RedirctToLogin(Page);
        }
        else
        {
            try
            {
                Hashtable validationHash = new Hashtable();
                string    IsData         = string.Empty;
                string    refData        = string.Empty;
                string    isInserted     = string.Empty;
                string    isRealese      = string.Empty;

                string inserXML = txt_Document_Xml.Text;
                inserXML = inserXML.Replace("&", "&amp;");
                txt_Document_Xml.Text = inserXML.ToString();

                string[] Dval = new string[1];
                Dval[0] = txt_Username.Text;
                string SAP_Messsage = STORE_RFC_CAll(txt_Unique_NO.Text, "X");
                if (SAP_Messsage == "Table Updated Successfuly")
                {
                    string isSaved = (string)ActionController.ExecuteAction("", "Hard_Copy_Document_Approval_Account.aspx", "update", ref refData, txt_header.Text, txt_Unique_NO.Text, "Store", txt_Username.Text);
                    if (isSaved != null || isSaved != "false")
                    {
                        bool isCreate = (bool)WFE.Action.ReleaseStep(txtProcessID.Text, txtInstanceID.Text, "218", "HARD COPY DOCUMENT APPROVAL STORE", "SUBMIT", "", txt_Username.Text, txt_Username.Text, "", "", "", "", "", "", "", "", "", Dval, txt_header.Text, txt_wi.Text, ref isRealese);
                        if (isCreate)
                        {
                            try
                            {
                                string mail    = "https://esp.sudarshan.com/Sudarshan-Portal/Login.aspx";
                                string emailid = (string)ActionController.ExecuteAction("", "PODispatchDeatails.aspx", "insertmaildata", ref isInserted, txtProcessID.Text, txtInstanceID.Text, 0, "HARD COPY DOCUMENT APPROVAL STORE", "SUBMIT", "*****@*****.**", "*****@*****.**", "<pre><font size='3'>Dear Sir/ Madam,</font></pre><p/><pre><font size='3'>Dispatch note document acknowledge successfully.</font></pre><p/><pre><font size='3'>Unique No: " + txt_Unique_NO.Text + "</font></pre><pre><font size='3'>Dispatch No: <b>" + txt_header.Text + "</font></pre><p/><pre><font size='3'>Vendor Code: " + txt_Vendor_Code.Text.Trim() + "</font></pre></p><pre><font size='3'>Vendor Name: <b>" + txt_Vendor_Name.Text + "</font></pre><p/><pre><font size='3'>PO Number: <b>" + txt_PO_NO.Text + "</font></pre><p/><pre></b><pre><font size='3'>INTERNET URL:<a data-cke-saved-href={" + mail + "} href={" + mail + "}>" + mail + "</a></font></pre></br><pre><font size='3'>Regards</font></pre><pre><font size='3'>Reporting Admin</font></pre><pre><font size='3'  color='red'><i><b>This is a system generated message. We request you not to reply to this message.</b></i></font></pre>", txt_header.Text);
                            }
                            catch (Exception)
                            {
                                throw;
                            }
                            finally
                            {
                                Page.RegisterStartupScript("onclick", "<script language='javascript'>{alert('Hard copy document acknowledge successfully...!');window.open('../../Portal/HomePage.aspx','frmset_WorkArea');}</script>");
                            }
                        }
                    }
                    else
                    {
                        Page.RegisterStartupScript("onclick", "<script language='javascript'>{alert('Dispatch Data Not Updated');window.open('../../Portal/HomePage.aspx','frmset_WorkArea');}</script>");
                    }
                }
                else
                {
                    Page.RegisterStartupScript("onclick", "<script language='javascript'>{alert('SAP Data Not Updated');window.open('../../Portal/HomePage.aspx','frmset_WorkArea');}</script>");
                }
            }
            catch (Exception ex)
            {
                FSL.Logging.Logger.WriteEventLog(false, ex);
            }
        }
    }
Exemple #23
0
    protected void bindData()
    {
        StringBuilder html_Header = new StringBuilder();

        try
        {
            string inco_terms = string.Empty;
            string isdata     = string.Empty;
            txt_Dispatch.Text = (string)ActionController.ExecuteAction("", "Early_Payment_Request_Approval.aspx", "getpkdisp", ref isdata, txtInstanceID.Text, txtProcessID.Text);
            DataSet ds = (DataSet)ActionController.ExecuteAction("", "Early_Payment_Request.aspx", "getdispatchdetails", ref isdata, txt_Dispatch.Text);

            if (ds != null)
            {
                /*********************************************************************************************PO Header*********************************************************************************************************/

                html_Header.Append("<div class='col-md-12'><div class='panel panel-grey'><div class='panel-heading'><h4 class='panel-title'>PO Header</h4></div><div class='panel-body'><div class='table-responsive'>");
                html_Header.Append("<table class='table table-bordered' width='100%'>");
                html_Header.Append("<tr style='background-color:grey; text-align:center; color:white;'><th style='text-align:center'>Dispatch Req No</th><th style='text-align:center'>Vendor Name</th><th style='text-align:center'>Vendor Code</th><th style='text-align:center'>PO No</th><th style='text-align:center'>PO Date</th><th style='text-align:center'>Currency</th><th style='text-align:center'>Dispatch Date</th><th style='text-align:center'>PO Type</th><th style='text-align:center'>INCO Terms</th><th style='text-align:center'>PO Value</th><th style='text-align:center;'>PO GV</th><th style='text-align:center;'>Payment Terms</th><th style='text-align:center;'>Cumulative Inv Amt</th></tr>");
                html_Header.Append("<tbody>");
                txt_Request.Text = Convert.ToString(ds.Tables[0].Rows[0]["request_id"]);

                if (ds.Tables[0].Rows.Count > 0)
                {
                    initDate.InnerText = Convert.ToString(ds.Tables[0].Rows[0]["early_date"]);
                    Init_Email.Text    = Convert.ToString(ds.Tables[0].Rows[0]["Init_Email"]).Trim();
                    txt_PO.Text        = Convert.ToString(ds.Tables[0].Rows[0]["PO_Number"]);
                    CryptoGraphy crypt       = new CryptoGraphy();
                    string       encrypt_Str = crypt.Encryptdata(Convert.ToString(ds.Tables[0].Rows[0]["PO_Number"]));

                    /**********************************************************************Inco Term Details*************************************************************************************/
                    div_PaymentTemSetPoNo.InnerText = div_IcoTemSetPoNo.InnerText = Convert.ToString(ds.Tables[0].Rows[0]["PO_Number"]);
                    DataTable dts = (DataTable)ActionController.ExecuteAction("", "PODispatchDeatails.aspx", "getinco", ref isdata, Convert.ToString(ds.Tables[0].Rows[0]["PO_Number"]));
                    if (dts.Rows.Count > 0)
                    {
                        inco_terms = Convert.ToString(dts.Rows[0]["INCO_TERMS1"]) + " - " + Convert.ToString(dts.Rows[0]["INCO_TERMS2"]);
                        Inco1.Text = Convert.ToString(dts.Rows[0]["INCO_TERMS1"]);
                        Inco2.Text = Convert.ToString(dts.Rows[0]["INCO_TERMS2"]);
                    }

                    html_Header.Append("<tr><td style='text-align:center'>" + Convert.ToString(ds.Tables[0].Rows[0]["request_id"]) + "</td><td style='text-align:center'>" + Convert.ToString(ds.Tables[0].Rows[0]["vendor_name"]) + "</td><td style='text-align:center'><a href='#vendorinfo' role='button' id='ven1' data-toggle='modal'>" + Convert.ToString(ds.Tables[0].Rows[0]["vendor_code"]) + "</a></td><td style='text-align:center'><a href='#' role='button' id='anc1' onclick='viewData(" + 1 + ")'>" + Convert.ToString(ds.Tables[0].Rows[0]["PO_Number"]) + "</a><input type='text' id='encrypt_po1' value=" + encrypt_Str + " style='display:none'></td><td style='text-align:center'>" + Convert.ToString(ds.Tables[0].Rows[0]["date"]) + "</td><td style='text-align:center'>" + Convert.ToString(ds.Tables[0].Rows[0]["currency"]) + "</td><td style='text-align:center'>" + Convert.ToString(ds.Tables[0].Rows[0]["created_date"]) + "</td><td style='text-align:center'>" + Convert.ToString(ds.Tables[0].Rows[0]["po_type"]) + "</td><td style='text-align:center'>" + inco_terms + "</td><td style='text-align:right'>" + Convert.ToString(ds.Tables[0].Rows[0]["po_value"]) + "</td><td style='text-align:right;'>" + Convert.ToString(ds.Tables[0].Rows[0]["po_gv"]) + "</td><td style='text-align:center;'>" + Convert.ToString(ds.Tables[0].Rows[0]["PAYMENT_TERMS"]) + "</td><td style='text-align:right;'>" + Convert.ToString(ds.Tables[0].Rows[0]["cum_amt"]) + "</td></tr>");



                    /*********************************************************************Payment Term Details**************************************************************************************/
                    dts = (DataTable)ActionController.ExecuteAction("", "PODispatchDeatails.aspx", "getpayment_term", ref isdata, Convert.ToString(ds.Tables[0].Rows[0]["PO_Number"]));
                    if (dts.Rows.Count > 0)
                    {
                        Pay1.Text = Convert.ToString(dts.Rows[0]["ZTAGG"]);
                        Pay2.Text = Convert.ToString(dts.Rows[0]["ZFAEL"]);
                        Pay3.Text = Convert.ToString(dts.Rows[0]["ZTAG1"]);
                    }

                    /***************************************************************************Vendor Details********************************************************************************/
                    DataTable dtVendor = (DataTable)ActionController.ExecuteAction("", "Edit_Profile.aspx", "getvendordetails", ref isdata, Convert.ToString(ds.Tables[0].Rows[0]["vendor_code"]));

                    if (dtVendor.Rows.Count > 0)
                    {
                        lblName.Text   = Convert.ToString(dtVendor.Rows[0]["Vendor_Name1"]).Trim();
                        lblEmail.Text  = Convert.ToString(dtVendor.Rows[0]["Email"]).Trim();
                        lblMobile.Text = Convert.ToString(dtVendor.Rows[0]["Telephone1"]).Trim();
                        lblPan.Text    = Convert.ToString(dtVendor.Rows[0]["PAN_NO"]).Trim();

                        lblContact.Text = Convert.ToString(dtVendor.Rows[0]["Telephone2"]).Trim();
                        lblEcc.Text     = Convert.ToString(dtVendor.Rows[0]["ECC_NO"]).Trim();
                        lblCentral.Text = Convert.ToString(dtVendor.Rows[0]["Central_Sales_Tax_No"]).Trim();
                        lblLocal.Text   = Convert.ToString(dtVendor.Rows[0]["Local_Sales_Tax_No"]).Trim();
                        lblExcise.Text  = Convert.ToString(dtVendor.Rows[0]["Excise_Reg_No"]).Trim();
                        lblFax.Text     = Convert.ToString(dtVendor.Rows[0]["FAX_NO"]).Trim();

                        lblBank.Text    = Convert.ToString(dtVendor.Rows[0]["FK_BANK_ID"]).Trim();
                        lblAccount.Text = Convert.ToString(dtVendor.Rows[0]["ACC_NO"]).Trim();
                        lblIFSC.Text    = Convert.ToString(dtVendor.Rows[0]["IFSC_CODE"]).Trim();
                        lblBranch.Text  = Convert.ToString(dtVendor.Rows[0]["BRANCH"]).Trim();
                    }
                }

                html_Header.Append("</tbody></table>");

                /******************************************************************************Invoice Details**************************************************************************************************************************/

                html_Header.Append("<div>");
                html_Header.Append("<div class='col-md-1' style='text-align:right'>");
                html_Header.Append("<b>Invoice No :</b>");
                html_Header.Append("</div>");
                html_Header.Append("<div class='col-md-1'>");
                html_Header.Append(Convert.ToString(ds.Tables[0].Rows[0]["Invoice_No"]));
                html_Header.Append("</div>");
                html_Header.Append("<div class='col-md-2' style='text-align:right'>");
                html_Header.Append("<b>Invoice Date :</b>");
                html_Header.Append("</div>");
                html_Header.Append("<div class='col-md-1'>");
                html_Header.Append(Convert.ToString(ds.Tables[0].Rows[0]["Invoice_Date"]));
                html_Header.Append("</div>");
                html_Header.Append("<div class='col-md-2' style='text-align:right'>");
                html_Header.Append("<b>Invoice Amount :</b>");
                html_Header.Append("</div>");
                html_Header.Append("<div class='col-md-1'>");
                html_Header.Append(Convert.ToString(ds.Tables[0].Rows[0]["Invoice_Amount"]));
                html_Header.Append("</div>");
                html_Header.Append("<div class='col-md-2' style='text-align:right'>");
                html_Header.Append("<b>Delivery Note :</b>");
                html_Header.Append("</div>");
                html_Header.Append("<div class='col-md-1'>");
                html_Header.Append(Convert.ToString(ds.Tables[0].Rows[0]["Delivery_Note"]));
                html_Header.Append("</div>");
                html_Header.Append("</div>");

                /**************************************************************************Hide/Show links******************************************************************************************************************************/
                html_Header.Append("<div class='row'>&nbsp;</div>");
                html_Header.Append("<div class='col-md-10'>&nbsp;</div>");
                html_Header.Append("<div class='col-md-2' style='text-align:right'><a id='showdtl' runat='server' onclick='Show_Dtl()' href='#'>Show Details</a>");
                html_Header.Append("<a id='hidedtl' runat='server' onclick='Hide_Dtl()' href='#' style='display:none'>Hide Details</a></div>");
                html_Header.Append("</div></div></div></div>");


                /*****************************************************************************PO Details**************************************************************************************************************************/

                html_Header.Append("<div class='col-md-12' id='div_dtl' runat='server' style='display:none'><div class='panel panel-grey'><div class='panel-heading'><h4 class='panel-title'>PO Details</h4></div><div class='panel-body'><div class='table-responsive'>");
                html_Header.Append("<table class='table table-bordered' width='100%'>");
                html_Header.Append("<tr style='background-color:grey; text-align:center; color:white;'><th style='text-align:center'>Material No</th><th style='text-align:center'>Plant</th><th style='text-align:center'>Material Description</th><th style='text-align:center'>Quantity</th><th style='text-align:center'>UOM</th><th style='text-align:center'>Net Price</th><th style='text-align:center'>Amount</th><th style='text-align:center'>Dispatch Qty</th><th style='text-align:center;'>Goods Received Qty</th><th style='text-align:center; display:none'>PK_VENDOR_PO_DTL</th></tr>");
                html_Header.Append("<tbody>");

                if (ds.Tables[1].Rows.Count > 0)
                {
                    for (int i = 0; i < ds.Tables[1].Rows.Count; i++)
                    {
                        html_Header.Append("<tr><td style='text-align:center'>" + Convert.ToString(ds.Tables[1].Rows[i]["material_no"]) + "</td><td style='text-align:center'>" + Convert.ToString(ds.Tables[1].Rows[i]["plant"]) + "</td><td style='text-align:center'>" + Convert.ToString(ds.Tables[1].Rows[i]["storage_location"]) + "</td><td style='text-align:right'>" + Convert.ToString(ds.Tables[1].Rows[i]["quantity"]) + "</td><td style='text-align:center'>" + Convert.ToString(ds.Tables[1].Rows[i]["uom"]) + "</td><td style='text-align:right'>" + Convert.ToString(ds.Tables[1].Rows[i]["net_price"]) + "</td><td style='text-align:right'>" + Convert.ToString(ds.Tables[1].Rows[i]["amount"]) + "</td><td style='text-align:right'>" + Convert.ToString(ds.Tables[1].Rows[i]["dispatch_quantity"]) + "</td><td style='text-align:right;'>" + Convert.ToString(ds.Tables[1].Rows[i]["gr_quantity"]) + "</td><td style='text-align:center; display:none'>" + Convert.ToString(ds.Tables[1].Rows[i]["PK_Dispatch_Note_HDR_ID"]) + "</td></tr>");
                    }
                }

                html_Header.Append("</tbody></table>");
                html_Header.Append("</div></div></div></div>");

                /*****************************************************************************Dispatch Details*************************************************************************************************************************/

                html_Header.Append("<div class='col-md-6'><div class='panel panel-grey' data-height='290px'><div class='panel-heading'><h4 class='panel-title'>Dispatch Details</h4></div><div class='panel-body'>");
                html_Header.Append("<table class='table table-bordered' width='100%'>");
                html_Header.Append("<tr><td class='col-md-3'><b>Transporter Name</b></td><td class='col-md-9'>" + Convert.ToString(ds.Tables[0].Rows[0]["Transporter_Name"]) + "</td></tr>");
                html_Header.Append("<tr><td class='col-md-3'><b>Vehicle No</b></td><td class='col-md-9'>" + Convert.ToString(ds.Tables[0].Rows[0]["vehicle_no"]) + " </td></tr>");
                html_Header.Append("<tr><td class='col-md-3'><b>Contact Person Name</b></td><td class='col-md-9'>" + Convert.ToString(ds.Tables[0].Rows[0]["contact_person_name"]) + " </td></tr>");
                html_Header.Append("<tr><td class='col-md-3'><b>Contact No</b></td><td class='col-md-9'>" + Convert.ToString(ds.Tables[0].Rows[0]["contact_no"]) + " </td></tr>");
                html_Header.Append("<tr><td class='col-md-3'><b>LR No.</b></td><td class='col-md-9'>" + Convert.ToString(ds.Tables[0].Rows[0]["lr_no"]) + " </td></tr>");
                html_Header.Append("<tr><td class='col-md-3'><b>LR Date</b></td><td class='col-md-9'>" + Convert.ToString(ds.Tables[0].Rows[0]["lr_date"]) + " </td></tr>");
                html_Header.Append("</table></div></div></div>");

                /**********************************************************************************Documents*********************************************************************************************************************/

                html_Header.Append("<div class='col-md-6'><div class='panel panel-grey'><div class='panel-heading'><h4 class='panel-title'>Documents</h4></div><div class='panel-body' data-scrollbar='true' data-height='135px'>");
                html_Header.Append("<table class='table table-bordered' width='100%'>");
                html_Header.Append("<tbody>");
                html_Header.Append("<tr style='background-color:grey; text-align:center; color:white;'><td style='text-align:center'>Document Name</td><td style='text-align:center'>File Name</td></tr>");
                DataTable dt = (DataTable)ActionController.ExecuteAction("", "Early_Payment_Request.aspx", "getfilenames", ref isdata, "DISPATCH NOTE", Convert.ToString(ds.Tables[0].Rows[0]["request_id"]));

                if (dt.Rows.Count > 0)
                {
                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        html_Header.Append("<tr><td style='text-align:center'>" + Convert.ToString(dt.Rows[i]["DOCUMENT_TYPE"]) + "</td><td style='text-align:center'><a href='#' OnClick='downloadfiles(" + Convert.ToString(dt.Rows[i]["PK_ID"]) + ")'>" + Convert.ToString(dt.Rows[i]["FILENAME"]) + "</a></td></tr>");
                    }
                }
                html_Header.Append("</tbody>");
                html_Header.Append("</table></div></div></div>");

                /***********************************************************************************Remark********************************************************************************************************************/

                html_Header.Append("<div class='col-md-6' style='margin-top:0.3%'><div class='panel panel-grey'><div class='panel-heading'><h4 class='panel-title'>Remarks</h4></div><div class='panel-body'>");
                html_Header.Append("<table class='table table-bordered' width='100%'>");
                html_Header.Append("<tbody>");
                html_Header.Append("<tr><td style='text-align:center'><textarea name='txtRemark' cols='45' class='form-control' ID='txtRemark'></textarea></td></tr>");
                html_Header.Append("</tbody>");
                html_Header.Append("</table></div></div></div>");

                /*******************************************************************************************************************************************************************************************************/
            }
            div_header.InnerHtml = Convert.ToString(html_Header);
        }
        catch (Exception Exc) { Logger.WriteEventLog(false, Exc); }
    }
Exemple #24
0
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        try
        {
            ActionController.DisablePageCaching(this);
            if (ActionController.IsSessionExpired(this))
            {
                ActionController.RedirctToLogin(this);
            }
            else
            {
                string isdata  = string.Empty;
                string isSaved = string.Empty;

                string fuelxml_string = txt_xml_data_fuel.Text;
                fuelxml_string         = fuelxml_string.Replace("&", "&amp;");
                fuelxml_string         = fuelxml_string.Replace(">", "&gt;");
                fuelxml_string         = fuelxml_string.Replace("<", "&lt;");
                fuelxml_string         = fuelxml_string.Replace("||", ">");
                fuelxml_string         = fuelxml_string.Replace("|", "<");
                fuelxml_string         = fuelxml_string.Replace("'", "&apos;");
                txt_xml_data_fuel.Text = fuelxml_string.ToString();

                string maintainancexml_string = txt_xml_data_maitainance.Text;

                maintainancexml_string        = maintainancexml_string.Replace("&", "&amp;");
                maintainancexml_string        = maintainancexml_string.Replace(">", "&gt;");
                maintainancexml_string        = maintainancexml_string.Replace("<", "&lt;");
                maintainancexml_string        = maintainancexml_string.Replace("||", ">");
                maintainancexml_string        = maintainancexml_string.Replace("|", "<");
                maintainancexml_string        = maintainancexml_string.Replace("'", "&apos;");
                txt_xml_data_maitainance.Text = maintainancexml_string.ToString();

                string driverxml_string = txt_xml_data_driver.Text;

                driverxml_string         = driverxml_string.Replace("&", "&amp;");
                driverxml_string         = driverxml_string.Replace(">", "&gt;");
                driverxml_string         = driverxml_string.Replace("<", "&lt;");
                driverxml_string         = driverxml_string.Replace("||", ">");
                driverxml_string         = driverxml_string.Replace("|", "<");
                driverxml_string         = driverxml_string.Replace("'", "&apos;");
                txt_xml_data_driver.Text = driverxml_string.ToString();



                string tyrexml_string = txt_xml_data_tyre.Text;

                tyrexml_string         = tyrexml_string.Replace("&", "&amp;");
                tyrexml_string         = tyrexml_string.Replace(">", "&gt;");
                tyrexml_string         = tyrexml_string.Replace("<", "&lt;");
                tyrexml_string         = tyrexml_string.Replace("||", ">");
                tyrexml_string         = tyrexml_string.Replace("|", "<");
                tyrexml_string         = tyrexml_string.Replace("'", "&apos;");
                txt_xml_data_tyre.Text = tyrexml_string.ToString();

                string batteryexml_string = txt_xml_data_battery.Text;

                batteryexml_string        = batteryexml_string.Replace("&", "&amp;");
                batteryexml_string        = batteryexml_string.Replace(">", "&gt;");
                batteryexml_string        = batteryexml_string.Replace("<", "&lt;");
                batteryexml_string        = batteryexml_string.Replace("||", ">");
                batteryexml_string        = batteryexml_string.Replace("|", "<");
                batteryexml_string        = batteryexml_string.Replace("'", "&apos;");
                txt_xml_data_battery.Text = batteryexml_string.ToString();

                string FILEXML = Txt_File_xml.Text;

                FILEXML           = FILEXML.Replace("&", "&amp;");
                FILEXML           = FILEXML.Replace(">", "&gt;");
                FILEXML           = FILEXML.Replace("<", "&lt;");
                FILEXML           = FILEXML.Replace("||", ">");
                FILEXML           = FILEXML.Replace("|", "<");
                FILEXML           = FILEXML.Replace("'", "&apos;");
                Txt_File_xml.Text = FILEXML.ToString();

                //txt_Document_Xml.Text="<ROWSET></ROWSET>";
                string isInserted = string.Empty;
                string instanceID = (string)WFE.Action.StartCase(isInserted, txtProcessID.Text, txt_Username.Text, txt_Username.Text, txtEmailID.Text, "15");
                txtInstanceID.Text = instanceID;


                DataTable dtRole = (DataTable)ActionController.ExecuteAction("", "Car_Expense_Approval.aspx", "getdocapprover", ref isInserted, "CAR EXPENSE PAYMENT APPROVAL");
                if (dtRole != null && dtRole.Rows.Count > 0)
                {
                    string[] Dval     = new string[dtRole.Rows.Count];
                    string   Emailids = "";
                    for (int i = 0; i < dtRole.Rows.Count; i++)
                    {
                        Dval[i] = dtRole.Rows[i]["USER_ADID"].ToString().Trim();
                        if (Emailids == "")
                        {
                            Emailids = dtRole.Rows[i]["EMAIL_ID"].ToString().Trim();
                        }
                        else
                        {
                            Emailids = Emailids + "," + dtRole.Rows[i]["EMAIL_ID"].ToString().Trim();
                        }
                    }
                    isSaved = (string)ActionController.ExecuteAction("", "Car_Expense.aspx", "insert", ref isdata, txtProcessID.Text, txtInstanceID.Text, txt_Username.Text, txt_xml_data_fuel.Text, txt_xml_data_maitainance.Text, txt_xml_data_driver.Text, Txt_File_xml.Text, txtexpnsamt.Text, ddl_Payment_Mode.SelectedValue, ddlAdv_Location.SelectedValue, txt_fule_Dev.Text, txt_maintain_Dev.Text, txt_xml_data_tyre.Text, txt_xml_data_battery.Text, txtEmailID.Text, Emailids);
                    if (isSaved == null || isdata.Length > 0 || isSaved == "false")
                    {
                        string[] errmsg = isdata.Split(':');
                        Page.RegisterStartupScript("onclick", "<script language='javascript'>{alert('" + errmsg[0].ToString() + "');}</script>");
                    }
                    else
                    {
                        bool isCreate = false;

                        isCreate = (bool)WFE.Action.ReleaseStep(txtProcessID.Text, txtInstanceID.Text, txt_StepId.Text, "CAR EXPENSE REQUEST", "SUBMIT", "", txt_Username.Text.Trim(), "", "", "", "", "", "", "", "", "", "", Dval, isSaved.ToString(), "0", ref isInserted);
                        if (isCreate)
                        {
                            try
                            {
                                string    isValid = string.Empty;
                                DataTable dt      = (DataTable)ActionController.ExecuteAction(txt_Username.Text, "Car_Expense.aspx", "getfilenames", ref isValid, "CAR POLICY", isSaved.ToString());
                                if (dt.Rows.Count > 0)
                                {
                                    string activeDir = ConfigurationManager.AppSettings["DOCPATH"].ToString();
                                    string path      = string.Empty;

                                    string foldername = isSaved.ToString();
                                    foldername = foldername.Replace("/", "_");
                                    path       = activeDir + "\\" + foldername;
                                    if (Directory.Exists(path))
                                    {
                                    }
                                    else
                                    {
                                        Directory.CreateDirectory(path);
                                        string[] directories = Directory.GetFiles(activeDir);

                                        path = path + "\\";
                                        foreach (var directory in directories)
                                        {
                                            for (int i = 0; i < dt.Rows.Count; i++)
                                            {
                                                var sections = directory.Split('\\');
                                                var fileName = sections[sections.Length - 1];
                                                if (dt.Rows[i]["filename"].ToString() == fileName)
                                                {
                                                    System.IO.File.Move(activeDir + "\\" + fileName, path + fileName);
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                            catch (Exception exs)
                            {
                                Logger.WriteEventLog(false, exs);
                            }
                            finally
                            {
                                Page.RegisterStartupScript("onclick", "<script language='javascript'>{alert('Car Expense Submitted Successfully and Voucher No : " + isSaved.ToString() + "');window.open('../../Portal/SCIL/Home.aspx','frmset_WorkArea');}</script>");
                            }
                        }

                        else
                        {
                            string[] errmsg = isInserted.Split(':');
                            if (errmsg[1].ToString().Trim() != "")
                            {
                                Page.RegisterStartupScript("onclick", "<script language='javascript'>{alert('" + errmsg[1].ToString() + "');}</script>");
                            }
                            else
                            {
                                Page.RegisterStartupScript("onclick", "<script language='javascript'>{alert('" + (string)isSaved + "');}</script>");
                            }
                        }
                    }
                }
            }
            MP_Loading.Hide();
        }
        catch (Exception Exc) { FSL.Logging.Logger.WriteEventLog(false, Exc); MP_Loading.Hide(); }
    }
Exemple #25
0
    public void Init(FCObject ewb)
    {
#if WQ_CODE_WIP
        _owner = ewb as ActionController;
#endif
    }
    protected void bindData()
    {
        StringBuilder html_Header  = new StringBuilder();
        StringBuilder html_Header1 = new StringBuilder();
        StringBuilder html_Header2 = new StringBuilder();
        StringBuilder html_Header3 = new StringBuilder();

        try
        {
            string    inco_terms = string.Empty;
            string    isdata     = string.Empty;
            DataTable dt         = (DataTable)ActionController.ExecuteAction("", "Car_Expense_Approval.aspx", "getpkcarexpns", ref isdata, txtProcessID.Text, txtInstanceID.Text);
            isdata = "";
            DataSet ds = (DataSet)ActionController.ExecuteAction("", "Car_Expense_Approval.aspx", "getcarexpnsdetails", ref isdata, dt.Rows[0]["PK_CAR_EXPNS_ID"].ToString());


            if (ds != null)
            {
                if (ds.Tables[0].Rows.Count > 0)
                {
                    html_Header.Append("<table class='table table-bordered' id='tblfuel' width='100%'>");
                    html_Header.Append("<thead><tr><th>#</th><th style='text-align:center'>Date</th><th style='text-align:center'>Perticular</th><th style='text-align:center'>Litre</th><th style='text-align:center'>Amount</th></tr></thead>");
                    html_Header.Append("<tbody>");

                    if (ds.Tables[0].Rows.Count > 0)
                    {
                        for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                        {
                            html_Header.Append("<tr><td>" + (i + 1) + "</td><td style='text-align:center'>" + ds.Tables[0].Rows[i]["FUEL_DATE"] + "<input type='hidden' id='txtfueldate" + (i + 1) + "'  runat='server' Value='" + ds.Tables[0].Rows[i]["FUEL_DATE"] + "'  /></td><td style='text-align:center'>" + ds.Tables[0].Rows[i]["PETROL_PUMP"] + "</td><td style='text-align:center'>" + ds.Tables[0].Rows[i]["FUEL_LITRE"] + "</td><td style='text-align:right'>" + ds.Tables[0].Rows[i]["AMOUNT"] + "<input type='hidden' id='txtfuelamount" + (i + 1) + "'  runat='server' Value='" + ds.Tables[0].Rows[i]["AMOUNT"] + "'  /></td></tr>");
                        }
                    }

                    html_Header.Append("</tbody></table>");
                    divfuel.InnerHtml = html_Header.ToString();
                }

                if (ds.Tables[1].Rows.Count > 0)
                {
                    html_Header1.Append("<table class='table table-bordered' id='tblmaintenance' width='100%'>");
                    html_Header1.Append("<thead><tr><th>#</th><th style='text-align:center'>Date</th><th style='text-align:center'>Vehical No.</th><th style='text-align:center'>Date Of Purchase</th><th style='text-align:center'>Amount</th></tr>  </thead>");
                    html_Header1.Append("<tbody>");

                    if (ds.Tables[1].Rows.Count > 0)
                    {
                        for (int j = 0; j < ds.Tables[1].Rows.Count; j++)
                        {
                            html_Header1.Append("<tr><td>" + (j + 1) + "</td><td style='text-align:center'>" + ds.Tables[1].Rows[j]["MAINTAINCE_DATE"] + "<input type='hidden' id='txtmaintenancedate" + (j + 1) + "'  runat='server' Value='" + ds.Tables[1].Rows[j]["MAINTAINCE_DATE"] + "'  /></td><td style='text-align:center'>" + ds.Tables[1].Rows[j]["VEHICLE_NO"] + "</td><td style='text-align:center'>" + ds.Tables[1].Rows[j]["DATE_OF_PURCHASE"] + "</td><td style='text-align:right'>" + ds.Tables[1].Rows[j]["AMOUNT"] + "<input type='hidden' id='txtmaintenanceamount" + (j + 1) + "'  runat='server' Value='" + ds.Tables[1].Rows[j]["AMOUNT"] + "'  /></td></tr>");
                        }
                    }

                    html_Header1.Append("</tbody></table>");
                    divmaintenance.InnerHtml = html_Header1.ToString();
                }

                if (ds.Tables[2].Rows.Count > 0)
                {
                    html_Header2.Append("<table class='table table-bordered' id='tbldriver' width='100%'>");
                    html_Header2.Append("<thead><tr><th>#</th><th style='text-align:center'>Type</th><th style='text-align:center'>Date</th><th style='text-align:center'>Amount</th></tr></thead>");
                    html_Header2.Append("<tbody>");

                    if (ds.Tables[2].Rows.Count > 0)
                    {
                        for (int k = 0; k < ds.Tables[2].Rows.Count; k++)
                        {
                            html_Header2.Append("<tr><td>" + (k + 1) + "</td><td style='text-align:center'>" + ds.Tables[2].Rows[k]["DRIVER_TYPE"] + "</td><td style='text-align:center'>" + ds.Tables[2].Rows[k]["DATE"] + "<input type='hidden' id='txtdriverdate" + (k + 1) + "'  runat='server' Value='" + ds.Tables[2].Rows[k]["DATE"] + "'  /></td><td style='text-align:right'>" + ds.Tables[2].Rows[k]["AMOUNT"] + "<input type='hidden' id='txtdriveramount" + (k + 1) + "'  runat='server' Value='" + ds.Tables[2].Rows[k]["AMOUNT"] + "'  /></td></tr>");
                        }
                    }

                    html_Header2.Append("</tbody></table>");
                    div_driver.InnerHtml = html_Header2.ToString();
                }
            }

            /***********************************************************************************Remark********************************************************************************************************************/

            //html_Header3.Append("<div class='col-md-6' style='margin-top:0.3%'><div class='panel panel-grey'><div class='panel-heading'><h4 class='panel-title'>Remarks</h4></div><div class='panel-body'>");
            //html_Header3.Append("<table class='table table-bordered' id='tblremark' width='100%'>");
            //html_Header3.Append("<tbody>");
            //html_Header3.Append("<tr><td style='text-align:center'><textarea name='txtRemark' cols='45' class='form-control' ID='txtRemark'></textarea></td></tr>");
            //html_Header3.Append("</tbody>");
            //html_Header3.Append("</table></div></div></div>");

            /*******************************************************************************************************************************************************************************************************/

            //div_doc_remark.InnerHtml = Convert.ToString(html_Header3);
        }
        catch (Exception Exc) { Logger.WriteEventLog(false, Exc); }
    }
Exemple #27
0
 public FAction(ActionController actionController)
 {
     this.controller = actionController;
 }
    protected void btnReject_Click(object sender, EventArgs e)
    {
        try
        {
            ActionController.DisablePageCaching(this);
            if (ActionController.IsSessionExpired(this))
            {
                ActionController.RedirctToLogin(this);
            }
            else
            {
                string refData    = string.Empty;
                string isInserted = string.Empty;
                string ISValid    = string.Empty;
                txt_Condition.Text = "3";
                string remark = txt_Remark.Text;

                DataTable dtback = (DataTable)ActionController.ExecuteAction("", "Car_Expense_Approval.aspx", "getsendback", ref refData, txtProcessID.Text, txtInstanceID.Text);
                if (dtback != null && dtback.Rows.Count > 0)
                {
                    txtEmailID.Text = dtback.Rows[0]["EMAIL_ID"].ToString();
                    string isSaved = (string)ActionController.ExecuteAction("", "Car_Expense_Approval.aspx", "update", ref refData, txtProcessID.Text, txtInstanceID.Text, remark, txt_Username.Text, "3");

                    if (isSaved == null || refData.Length > 0 || isSaved == "false")
                    {
                        string[] errmsg = refData.Split(':');
                        Page.RegisterStartupScript("onclick", "<script language='javascript'>{alert('" + errmsg[0].ToString() + "');}</script>");
                    }
                    else
                    {
                        string[] Dval = new string[1];
                        Dval[0] = dtback.Rows[0]["actionbyuser"].ToString();
                        bool isCreate = (bool)WFE.Action.ReleaseStep(txtProcessID.Text, txtInstanceID.Text, "128", "CAR EXPENSE APPROVAL", "SEND-BACK", dtback.Rows[0]["actionbyuser"].ToString(), txt_Username.Text.Trim(), "", "", "", "", "", "", "", "", "", "", Dval, txtexpensno.Text, txtWIID.Text, ref isInserted);
                        if (isCreate)
                        {
                            try
                            {
                                string msg     = "<pre><font size='3'>Dear Sir/Madam,</font></pre><p/> <pre><font size='3'>The Car Expense request has been Rejected.</font></pre><p/><pre><font size='3'>Car Expense No: " + txtexpensno.Text + "</font></pre><pre><font size='3'>Created By: " + txt_Username.Text.Trim() + "</font></pre></p><pre></b><pre>INTRANET URL:http://" + compname + "/Sudarshan-Portal/Login.aspx</pre><pre>INTERNET URL:https://" + compname + "/Sudarshan-Portal/Login.aspx</pre><br/><pre>Regards</pre><pre><b>Reporting Admin<b></pre><br/><pre></pre><br/><pre><font size='3'  color='red'><i><b>This is a system generated message. We request you not to reply to this message.</b></i></font></pre>";
                                string emailid = (string)ActionController.ExecuteAction(txt_Username.Text, "Early_Payment_Request.aspx", "insetmaildata", ref isInserted, txtProcessID.Text, txtInstanceID.Text, 0, "CAR EXPENSE REQUEST APPROVAL", "SUBMIT", txtEmailID.Text, "", msg, "Car Expense No: " + txtexpensno.Text);
                            }
                            catch (Exception ex)
                            {
                                // throw;
                                FSL.Logging.Logger.WriteEventLog(false, ex);
                            }
                            finally
                            {
                                Page.RegisterStartupScript("onclick", "<script language='javascript'>{alert('Car Expense Request send-back Successfully...!');window.open('../../Portal/SCIL/Home.aspx','frmset_WorkArea');}</script>");
                            }
                        }
                    }
                }
                else
                {
                    Page.RegisterStartupScript("onclick", "<script language='javascript'>{alert('Send-back Approver Not Found...!');}</script>");
                }
            }
        }
        catch (Exception ex)
        {
            FSL.Logging.Logger.WriteEventLog(false, ex);
        }
    }
Exemple #29
0
 public StopAction(ActionController controller) : base(controller)
 {
 }
Exemple #30
0
    void FixedUpdate()
    {
        if (renderer != null)
        {
            if (punchTimer > 0)
            {
                punchTimer -= 1;
            }

            if (kickTimer > 0)
            {
                kickTimer -= 1;
            }

            if (punchTimer == 0 && kickTimer == 0 && !bodySlam)
            {
                renderer.sprite = idleSprite;
            }
            else if (punchTimer > 0)
            {
                renderer.sprite = punchSprite;
            }
            else if (kickTimer > 0)
            {
                renderer.sprite = kickSprite;
            }
            else if (bodySlam)
            {
                renderer.sprite = slamSprite;
            }
        }

        Debug.DrawRay(transform.position - new Vector3(0, collider.size.y / 2 + 0.1f, 0), new Vector2(0, -1));

        if (bodySlam && OnGround())
        {
            bodySlam = false;
            audio.PlayOneShot(slamHitClip);

            if (collider != null)
            {
                RaycastHit2D hit = Physics2D.Raycast(transform.position - new Vector3(0, collider.size.y / 2 + 0.1f, 0), new Vector2(0, -1), 0.5f);

                if (hit)
                {
                    ActionController controller = hit.collider.GetComponent <ActionController>();

                    if (controller != null)
                    {
                        if (transform.position.x > hit.collider.transform.position.x)
                        {
                            controller.TakeHit(new Vector2(250f * rigidbody.velocity.y, 10));
                        }
                        else
                        {
                            controller.TakeHit(new Vector2(-250f * rigidbody.velocity.y, 10));
                        }
                    }
                }
            }
        }

        if (rigidbody != null)
        {
            if (transform.position.y < -20 || transform.position.y > 80 || transform.position.x > 35 || transform.position.x < -55)
            {
                Life -= 1;

                if (Life < 0 && canDie)
                {
                    Destroy(gameObject);
                }
                else
                {
                    transform.position = new Vector3((float)((Random.value - 0.5) * 8), 5, 0);
                    rigidbody.velocity = new Vector2(Random.value - 0.5f, 0);
                    HitMultiplier      = 2;

                    PlaySound(deathClip);
                }
            }
        }
    }
Exemple #31
0
 public MoveAction(ActionController controller) : base(controller)
 {
 }
Exemple #32
0
 public void Init(FCObject owner)
 {
     _owner = owner as ActionController;
 }
 void onTriggerEnter(Collider col)
 {
     Debug.Log ("Bauss!");
     if (col.CompareTag("Player")){
         attackWillLand = true;
         targetObj = col;
         otherCharClass = col.GetComponentInParent<CharacterClass> ();
         otherActionController = col.GetComponentInParent<ActionController>();
     }
 }
Exemple #34
0
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        string isSaved    = string.Empty;
        string isChange   = string.Empty;
        string isInserted = string.Empty;
        string ref_data   = string.Empty;

        try
        {
            ActionController.DisablePageCaching(this);
            if (ActionController.IsSessionExpired(this))
            {
                ActionController.RedirctToLogin(this);
            }
            else
            {
                txt_Audit.Text = "LOCAL CONVEYANCE PAYMENT MODE CHANGE";
                // if (doa.Text == "")
                // {
                DataTable DTAP = new DataTable();

                if (ddl_Payment_Mode.SelectedItem.Text.ToUpper() == "CASH")
                {
                    DTAP = (DataTable)ActionController.ExecuteAction("", "Local_Conveyance_Approval.aspx", "getaccapprover", ref ref_data, "LOCAL CONVEYANCE ACCOUNT PAYMENT APPROVAL", ddlAdv_Location.SelectedValue, ddl_Payment_Mode.SelectedValue);
                }
                else
                {
                    DTAP = (DataTable)ActionController.ExecuteAction("", "Local_Conveyance_Approval.aspx", "getaccapprover", ref ref_data, "LOCAL CONVEYANCE ACCOUNT PAYMENT APPROVAL", 0, ddl_Payment_Mode.SelectedValue);
                }
                if (DTAP != null)
                {
                    if (DTAP.Rows.Count > 0)
                    {
                        txt_Condition.Text = "3";
                        isSaved            = (string)ActionController.ExecuteAction("", "Local_Conveyance_Approval.aspx", "update", ref ref_data, "0", txtProcessID.Text, txtInstanceID.Text, txt_Username.Text, "", "Submit", txt_Audit.Text);
                        isChange           = (string)ActionController.ExecuteAction("", "Local_Conveyance_Approval.aspx", "updatemode", ref ref_data, ddlAdv_Location.SelectedValue, ddl_Payment_Mode.SelectedValue, txt_pk_id.Text);

                        if (isSaved == null || ref_data.Length > 0 || isChange == "false")
                        {
                            string[] errmsg = ref_data.Split(':');
                            Page.RegisterStartupScript("onclick", "<script language='javascript'>{alert('" + errmsg[0].ToString() + "');}</script>");
                        }
                        else
                        {
                            string[] Dval = new string[DTAP.Rows.Count];
                            Dval[0] = "";
                            if (DTAP.Rows.Count > 0)
                            {
                                for (int i = 0; i < DTAP.Rows.Count; i++)
                                {
                                    Dval[i] = Convert.ToString(DTAP.Rows[i]["USER_ADID"]);
                                    if (txtApproverEmail.Text == "")
                                    {
                                        txtApproverEmail.Text = Convert.ToString(DTAP.Rows[i]["EMAIL_ID"]);
                                    }
                                    else
                                    {
                                        txtApproverEmail.Text = txtApproverEmail.Text + ',' + Convert.ToString(DTAP.Rows[i]["EMAIL_ID"]);
                                    }
                                }
                            }
                            bool isCreate = (bool)WFE.Action.ReleaseStep(txtProcessID.Text, txtInstanceID.Text, "207", "LOCAL CONVEYANCE PAYMENT MODE CHANGE", "SUBMIT", txt_Username.Text, txt_Username.Text.Trim(), "", "", "", "", "", "", "", "", "", "", Dval, txt_Request.Text, txtWIID.Text, ref isInserted);
                            if (isCreate)
                            {
                                try
                                {
                                    if ((Init_Email.Text != "") && (txtEmailID.Text != ""))
                                    {
                                        string msg     = "<pre><font size='3'>Dear Sir/Madam,</font></pre><p/> <pre><font size='3'>Local Conveyance Request has been sent to Accounts for payment approval.</font></pre><p/> <pre><font size='3'>Request No: " + spn_req_no.InnerHtml + "</font></pre> <pre><font size='3'>Created By: " + span_ename.InnerHtml.Trim() + "</font></pre></p><pre></b><pre>INTERNET URL:https://" + compname + "/Sudarshan-Portal/Login.aspx</pre><br/><pre>Regards</pre><pre><b>Reporting Admin<b></pre><br/><pre></pre><br/><pre><font size='3'  color='red'><i><b>This is a system generated message. We request you not to reply to this message.</b></i></font></pre>";
                                        string emailid = (string)ActionController.ExecuteAction(txt_Username.Text, "Local_Conveyance.aspx", "insetmaildata", ref isInserted, txtProcessID.Text, txtInstanceID.Text, 0, "LOCAL CONVEYANCE APPROVAL", "SUBMIT", txt_Approver_Email.Text, Init_Email.Text, msg, "Request No: " + spn_req_no.InnerHtml);
                                    }
                                }
                                catch (Exception)
                                {
                                    throw;
                                }
                                finally
                                {
                                    Page.RegisterStartupScript("onclick", "<script language='javascript'>{alert('Local Conveyance has been sent for account payment approval...!');window.open('../../Portal/SCIL/Home.aspx','frmset_WorkArea');}</script>");
                                }
                            }
                        }            //
                    }
                    else
                    {
                        Page.RegisterStartupScript("onclick", "<script language='javascript'>{alert('Account Approver Not Available For " + ddl_Payment_Mode.SelectedItem.Text + " Payment Mode...!');window.open('../../Portal/SCIL/TaskDetails.aspx','frmset_WorkArea');}</script>");
                    }
                }
                else
                {
                    Page.RegisterStartupScript("onclick", "<script language='javascript'>{alert('Account Approver Not Available For " + ddl_Payment_Mode.SelectedItem.Text + " Payment Mode...!');window.open('../../Portal/SCIL/TaskDetails.aspx','frmset_WorkArea');}</script>");
                }
            }
        }
        catch (Exception Exc) { FSL.Logging.Logger.WriteEventLog(false, Exc); }
    }
        public Response<RestService.Entities.Action> getActions()
        {
            IncomingWebRequestContext requestContext = WebOperationContext.Current.IncomingRequest;

            Dictionary<string, string> data = new Dictionary<string, string>();

            string authString = requestContext.Headers[HttpRequestHeader.Authorization];

            Request request = makeRequest(requestContext, trimData(data), authString);

            ActionController controller = new ActionController();

            return controller.Call(request);
        }
 private void Awake() {
     instance = this;
 }
Exemple #37
0
    void Start()
    {
        rigidBody = GetComponent<Rigidbody2D>();
        spriteRenderer = GetComponent<SpriteRenderer>();
        actionController = gameObject.AddComponent<ActionController>();
        animator = GetComponent<Animator>();

        CustomStart();
    }
    protected void bindData(string process, string req_no)
    {
        string        isData = "";
        StringBuilder sb     = new StringBuilder();
        DataSet       dsData = (DataSet)ActionController.ExecuteAction("", "Bank_Voucher.aspx", "getreqdetails", ref isData, req_no, process);

        if (dsData != null)
        {
            string process_id  = Convert.ToString(dsData.Tables[0].Rows[0]["FK_PROCESS_ID"]);
            string instance_id = Convert.ToString(dsData.Tables[0].Rows[0]["FK_INSTANCE_ID"]);
            spn_Unq_No.InnerHtml   = Convert.ToString(dsData.Tables[0].Rows[0]["voucher_id"]);
            spn_date.InnerHtml     = Convert.ToDateTime(dsData.Tables[0].Rows[0]["created_date"]).ToString("dd-MMM-yyyy");
            spn_Emp_Code.InnerHtml = Convert.ToString(dsData.Tables[0].Rows[0]["emp_id"]);
            spn_Emp_Name.InnerHtml = spn_Emp_Name2.InnerHtml = Convert.ToString(dsData.Tables[0].Rows[0]["employee_name"]);
            string userid      = Convert.ToString(dsData.Tables[0].Rows[0]["user_adid"]);
            string cost_center = Convert.ToString(dsData.Tables[0].Rows[0]["KOSTL"]);
            string narration   = Convert.ToString(dsData.Tables[2].Rows[0]["Narration"]);
            string deviated    = Convert.ToString(dsData.Tables[0].Rows[0]["deviated"]);
            span_vehicle.InnerHtml = Convert.ToString(dsData.Tables[0].Rows[0]["vehicle_no"]);
            string pdate = Convert.ToString(dsData.Tables[0].Rows[0]["pur_date"]);
            if (pdate != "")
            {
                string yr = pdate.Substring(0, 4);
                string mn = pdate.Substring(4, 2);
                string dd = pdate.Substring(6, 2);

                string[] mon = new string[] { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };
                span_purchase.InnerHtml = dd + "-" + mon[Convert.ToInt32(mn) - 1] + "-" + yr;
            }
            else
            {
                span_purchase.InnerHtml = "--";
            }

            DataTable dtUser = (DataTable)ActionController.ExecuteAction("", "Domestic_Travel_Request.aspx", "pgettraveluser", ref isData, userid);
            if (dtUser.Rows.Count > 0)
            {
                spn_Emp_Code.InnerHtml = Convert.ToString(dtUser.Rows[0]["EMP_ID"]);
                spn_Emp_Name.InnerHtml = spn_Emp_Name2.InnerHtml = Convert.ToString(dtUser.Rows[0]["EMPLOYEE_NAME"]);
                if (Convert.ToString(dtUser.Rows[0]["BANK_ACCOUNT_NO"]).Trim() != "")
                {
                    spn_Acc_No.InnerHtml = Convert.ToString(dtUser.Rows[0]["BANK_ACCOUNT_NO"]);
                }
                else
                {
                    spn_Acc_No.InnerHtml = "NA";
                }
                if (Convert.ToString(dtUser.Rows[0]["IFSC_CODE"]).Trim() != "")
                {
                    spn_IFSC_Code.InnerHtml = Convert.ToString(dtUser.Rows[0]["IFSC_CODE"]);
                }
                else
                {
                    spn_IFSC_Code.InnerHtml = "NA";
                }
                if (Convert.ToString(dtUser.Rows[0]["BANK_NAME"]).Trim() != "")
                {
                    spn_Bank_Name.InnerHtml = Convert.ToString(dtUser.Rows[0]["BANK_NAME"]);
                }
                else
                {
                    spn_Bank_Name.InnerHtml = "NA";
                }
            }
            DataTable dtApprover = (DataTable)ActionController.ExecuteAction("", "Domestic_Travel_Request.aspx", "pgettravelrequestapprover", ref isData, userid);
            if (dtApprover != null)
            {
                if (dtApprover.Rows.Count > 0)
                {
                    if (Convert.ToString(dtApprover.Rows[0]["approver"]) != "" && Convert.ToString(dtApprover.Rows[0]["approver"]) != "0")
                    {
                        //spn_Approver.InnerHtml = Convert.ToString(dtApprover.Rows[0]["approver_name"]);
                    }
                    else
                    {
                        //spn_Approver.InnerHtml = "NA";
                    }

                    if (Convert.ToString(dtApprover.Rows[0]["doa_approver"]) != "" && Convert.ToString(dtApprover.Rows[0]["doa_approver"]) != "0")
                    {
                        //spn_Dev_Approver.InnerHtml = Convert.ToString(dtApprover.Rows[0]["dapprover_name"]);
                    }
                    else
                    {
                        //spn_Dev_Approver.InnerHtml = "NA";
                    }
                }
                else
                {
                    //spn_Approver.InnerHtml = spn_Dev_Approver.InnerHtml = "NA";
                }
            }

            double tot_Amount1 = 0;
            for (int i = 0; i < dsData.Tables[1].Rows.Count; i++)
            {
                tot_Amount1 = tot_Amount1 + Convert.ToDouble(dsData.Tables[1].Rows[i]["Amount"]);
            }
            sb.Append("<table style='font-size:small; width:80%'><tbody>");
            sb.Append("<tr><td colspan='3'><b>Expense Claim Summary : </b></td></tr>");

            sb.Append("<tr style='text-align:center'><td class='clsBorder td2' style='border: 1px solid black;'>Total expenses claimed</td>");
            sb.Append("<td class='clsBorder td2' style='border: 1px solid black;'>Advance, if any</td>");
            sb.Append("<td class='clsBorder td2' style='border: 1px solid black;'>Net Paid/Received</td></tr>");

            int adv_amt = 0;
            if (Convert.ToString(dsData.Tables[0].Rows[0]["adv_amount"]) == "")
            {
                adv_amt = 0;
            }
            else
            {
                if (spn_Unq_No.InnerHtml.ToUpper().Contains("MCE"))
                {
                    adv_amt = 0;
                }
                else
                {
                    adv_amt = Convert.ToInt32(dsData.Tables[0].Rows[0]["adv_amount"]);
                }
            }


            int netpay = Convert.ToInt32(tot_Amount1) - adv_amt;

            if (req_no.Contains("ADV"))
            {
                sb.Append("<tr style='text-align:center'><td class='clsBorder td2' style='border: 1px solid black; text-align:center'>0</td>");
                sb.Append("<td class='clsBorder td2' style='border: 1px solid black; text-align:center'>" + Convert.ToString(tot_Amount1) + "</td>");
                sb.Append("<td class='clsBorder td2' style='border: 1px solid black; text-align:center'>0</td></tr>");
            }
            else
            {
                sb.Append("<tr style='text-align:center'><td class='clsBorder td2' style='border: 1px solid black; text-align:center'>" + tot_Amount1 + "</td>");
                sb.Append("<td class='clsBorder td2' style='border: 1px solid black; text-align:center'>" + Convert.ToString(adv_amt) + "</td>");
                sb.Append("<td class='clsBorder td2' style='border: 1px solid black; text-align:center'>" + Convert.ToString(netpay) + "</td></tr>");
            }
            sb.Append("</tbody></table><br />");

            sb.Append("<table style='width:100%'>");
            sb.Append("<thead><tr class='grey' style='text-align: center'><td class='clsBorder td1' rowspan='2' style='border: 1px solid black;'>PARTICULARS</td>");
            sb.Append("<td class='clsBorder td1' rowspan='2' style='border: 1px solid black;'>BUSINESS AREA</td><td colspan='2' class='clsBorder td1' style='border: 1px solid black;'>ACCOUNT CODE</td><td class='clsBorder td1' style='border: 1px solid black;'>AMOUNT</td></tr>");
            sb.Append("<tr class='grey' style='text-align: center'><td class='clsBorder td1' style='border: 1px solid black;'>MAIN LEDGER</td><td class='clsBorder td1' style='border: 1px solid black;'>COST CENTER</td><td class='clsBorder td1' style='border: 1px solid black;'>Rs</td></tr></thead>");
            double tot_Amount = 0;
            sb.Append("<tbody>");
            for (int i = 0; i < dsData.Tables[1].Rows.Count; i++)
            {
                sb.Append("<tr style='text-align:center'>");
                sb.Append("<td class='clsBorder td2' style='border: 1px solid black;'>" + Convert.ToString(dsData.Tables[1].Rows[i]["EXPENSE_HEAD"]) + "</td>");
                sb.Append("<td class='clsBorder td2' style='border: 1px solid black;'>" + Convert.ToString(dsData.Tables[0].Rows[0]["GSBER"]) + "</td>");
                sb.Append("<td class='clsBorder td2' style='border: 1px solid black;'>" + Convert.ToString(dsData.Tables[1].Rows[i]["sap_GLCode"]) + "</td>");
                sb.Append("<td class='clsBorder td2' style='border: 1px solid black;'>" + cost_center + "</td>");
                sb.Append("<td class='clsBorder td2' style='text-align:center; border: 1px solid black;'>" + Convert.ToString(dsData.Tables[1].Rows[i]["Amount"]) + "</td>");
                sb.Append("</tr>");
                tot_Amount = tot_Amount + Convert.ToDouble(dsData.Tables[1].Rows[i]["Amount"]);
            }
            sb.Append("<tr><td colspan='4' class='clsBorder td2' style='text-align:right; font-weight:bold; border: 1px solid black; padding-right:1%'>Rs.</td><td class='clsBorder td2' style='text-align:center;  border: 1px solid black;'>" + Convert.ToString(tot_Amount) + "</td></tr>");

            sb.Append("<tr><td class='clsBorder td2' style='border: 1px solid black;'>Amount in Words</td><td colspan='4' class='clsBorder td2' style='border: 1px solid black;'><span id='spn_amt_in_word' runat='server'>" + ConvertNumbertoWords(Convert.ToInt32(tot_Amount)) + "Only</span></td></tr>");
            sb.Append("<tr><td class='clsBorder td2' style='border: 1px solid black;'>Paid To</td><td colspan='4' class='clsBorder td2' style='border: 1px solid black;'><span id='spn_Emp_Name1' runat='server'>" + spn_Emp_Name.InnerHtml + "</span></td></tr>");
            sb.Append("<tr><td class='clsBorder td2' style='border: 1px solid black;'>Purpose/Narration</td><td colspan='4' class='clsBorder td2' style='border: 1px solid black;'><span id='spn_Narration' runat='server'>" + narration + "</span></td></tr>");
            sb.Append("</tbody></table>");
            fillAuditTrail(process_id, instance_id);
        }
        tbl_Data.InnerHtml = Convert.ToString(sb);
    }
Exemple #39
0
    protected void getUserInfo()

    {
        try
        {
            string    isdata = string.Empty;
            string    check  = string.Empty;
            DataTable dtUser = (DataTable)ActionController.ExecuteAction("", "Car_Expense.aspx", "pgettraveluser", ref isdata, txt_Username.Text);
            if (dtUser.Rows.Count > 0)
            {
                empno.InnerHtml            = Convert.ToString(dtUser.Rows[0]["EMP_ID"]);
                span_ename.InnerHtml       = Convert.ToString(dtUser.Rows[0]["EMPLOYEE_NAME"]);
                span_cc.InnerHtml          = Convert.ToString(dtUser.Rows[0]["COST_CENTER_NAME"]);
                span_dept.InnerHtml        = Convert.ToString(dtUser.Rows[0]["DEPT_NAME"]);
                span_grade.InnerHtml       = Convert.ToString(dtUser.Rows[0]["GRADE_NAME"]);
                span_mobile.InnerHtml      = Convert.ToString(dtUser.Rows[0]["MOBILE_NO"]);
                span_designation.InnerHtml = Convert.ToString(dtUser.Rows[0]["DESG_NAME"]);
                txt_designation.Text       = Convert.ToString(dtUser.Rows[0]["FK_DESIGNATIONID"]);
                if (Convert.ToString(dtUser.Rows[0]["BANK_ACCOUNT_NO"]).Trim() != "")
                {
                    span_bank_no.InnerHtml = Convert.ToString(dtUser.Rows[0]["BANK_ACCOUNT_NO"]);
                }
                else
                {
                    span_bank_no.InnerHtml = "NA";
                }
                if (Convert.ToString(dtUser.Rows[0]["IFSC_CODE"]).Trim() != "")
                {
                    span_Ifsc.InnerHtml = Convert.ToString(dtUser.Rows[0]["IFSC_CODE"]);
                }
                span_Division.InnerHtml = "NA";
                //span_Division.InnerHtml = Convert.ToString(dtUser.Rows[0]["DIVISION_NAME"]);
                DataTable dtApprover = (DataTable)ActionController.ExecuteAction("", "Car_Expense.aspx", "pgettravelrequestapprover", ref isdata, txt_Username.Text);
                if (dtApprover != null)
                {
                    if (dtApprover.Rows.Count > 0)
                    {
                        if (Convert.ToString(dtApprover.Rows[0]["approver"]) != "" && Convert.ToString(dtApprover.Rows[0]["approver"]) != "0")
                        {
                            span_Approver.InnerHtml = Convert.ToString(dtApprover.Rows[0]["approver"]);
                            span_app_name.InnerHtml = Convert.ToString(dtApprover.Rows[0]["approver_name"]);
                        }
                        else
                        {
                            span_Approver.InnerHtml = "NA";
                            span_app_name.InnerHtml = "NA";
                        }
                        txt_Approver_Email.Text = Convert.ToString(dtApprover.Rows[0]["approver_email"]);

                        if (Convert.ToString(dtApprover.Rows[0]["doa_approver"]) != "" && Convert.ToString(dtApprover.Rows[0]["doa_approver"]) != "0")
                        {
                            span_DApprover.InnerHtml = Convert.ToString(dtApprover.Rows[0]["doa_approver"]);
                            span_Dapp_name.InnerHtml = Convert.ToString(dtApprover.Rows[0]["dapprover_name"]);
                        }
                        else
                        {
                            span_Dapp_name.InnerHtml = span_DApprover.InnerHtml = "NA";
                        }
                    }
                    else
                    {
                        span_Approver.InnerHtml = "NA";
                    }
                }
                check = (string)ActionController.ExecuteAction("", "Car_Expense.aspx", "check", ref isdata, span_grade.InnerHtml, txt_Username.Text, empno.InnerHtml, txt_designation.Text);
                if (check != "")
                {
                    string   pol_ltrs       = string.Empty;
                    string[] TempResultData = check.Split('~');
                    string   user           = TempResultData[0].ToString();
                    string   Fuel           = TempResultData[1].ToString();
                    string   Maintenance    = TempResultData[2].ToString();
                    string   Driver         = TempResultData[3].ToString();
                    string   uniform        = TempResultData[4].ToString();
                    txt_car_Age.Text    = TempResultData[5].ToString();
                    main_car_age1.Value = txt_CarAge1.Value = TempResultData[5].ToString();
                    if (TempResultData[6].ToString() != "0")
                    {
                        pol_ltrs = TempResultData[6].ToString();
                    }
                    string ex_gratia = TempResultData[7].ToString();
                    txt_driversalary.Text = TempResultData[8].ToString();
                    if (user == "false")
                    {
                        Page.RegisterStartupScript("onclick", "<script language='javascript'>{alert('Car Expense claim cannot be submited ..!');window.open('../../Portal/SCIL/Home.aspx','frmset_WorkArea');}</script>");
                    }
                    if (Fuel == "false")
                    {
                        Li7.Style["display"]         = "none";
                        dv_polict_f.Style["display"] = "none";
                    }
                    else
                    {
                        StringBuilder html_Headerfuel = new StringBuilder();
                        html_Headerfuel.Append("<table class='table table-bordered' id='tblpolfuel' width='100%'>");
                        html_Headerfuel.Append("<thead><tr class='grey'><th style='text-align:center'>Grade</th><th style='text-align:center'>Fuel Eligibility per month in liters</th></tr></thead>");
                        html_Headerfuel.Append("<tbody>");
                        html_Headerfuel.Append("<tr><td style='text-align:center'>" + span_grade.InnerHtml + "</td><td style='text-align:center'>" + pol_ltrs + "</td></tr>");
                        html_Headerfuel.Append("</tbody></table>");
                        fuel_policy.InnerHtml = html_Headerfuel.ToString();
                    }
                    if (Maintenance == "false")
                    {
                        li_Maintenance.Style["display"] = "none";
                        Li1.Style["display"]            = "none";
                        Li2.Style["display"]            = "none";
                        dv_polictm.Style["display"]     = "none";
                    }
                    if (Driver == "false")
                    {
                        Li9.Style["display"] = "none";
                    }
                    if (uniform == "true")
                    {
                        tr_uniform.Style["display"] = "none";
                    }
                    if (ex_gratia == "true")
                    {
                        tr_ex_gratia.Style["display"] = "none";
                    }
                    DataTable dtcar = (DataTable)ActionController.ExecuteAction("", "Car_Expense.aspx", "getcardtl", ref isdata, empno.InnerHtml);    //empno.InnerHtml
                    if (dtcar.Rows.Count > 0)
                    {
                        txt_CarNumber.Text = Convert.ToString(dtcar.Rows[0]["Vehicle_No"]);
                        txt_CarDate.Text   = Convert.ToString(dtcar.Rows[0]["PUT_Date"]);

                        StringBuilder html_Header = new StringBuilder();
                        html_Header.Append("<table class='table table-bordered' id='tblpolfuel' width='100%'>");
                        html_Header.Append("<thead><tr class='grey'><th style='text-align:center'>Grade</th><th style='text-align:center'>Year 1</th><th style='text-align:center'>Year 2</th><th style='text-align:center'>Year 3</th><th style='text-align:center'>Year 4</th><th style='text-align:center'>Year 5</th><th style='text-align:center'>Year 6</th></tr></thead>");
                        html_Header.Append("<tbody>");
                        if (span_grade.InnerHtml == "Director")
                        {
                            html_Header.Append("<tr><td style='text-align:center'>Director</td><td style='text-align:center'>4,000/-</td><td style='text-align:center'>10,000/-</td><td style='text-align:center'>20,000/-</td><td style='text-align:center'>30,000/-</td><td style='text-align:center'>40,000/-</td><td style='text-align:center'>-</td></tr>");
                        }
                        else if (span_grade.InnerHtml == "L1")
                        {
                            html_Header.Append("<tr><td style='text-align:center'>L1</td><td style='text-align:center'>3,000/-</td><td style='text-align:center'>7,500/-</td><td style='text-align:center'>15,000/-</td><td style='text-align:center'>22,500/-</td><td style='text-align:center'>30,000/-</td><td style='text-align:center'>-</td></tr>");
                        }
                        else if (span_grade.InnerHtml == "L2")
                        {
                            html_Header.Append("<tr><td style='text-align:center'>L2</td><td style='text-align:center'>2,000/-</td><td style='text-align:center'>5,000/-</td><td style='text-align:center'>6,000/-</td><td style='text-align:center'>10,000/-</td><td style='text-align:center'>15,000/-</td><td style='text-align:center'>20,000/-</td></tr>");
                        }
                        html_Header.Append("</tbody></table>");
                        mt_policy.InnerHtml = html_Header.ToString();
                    }
                    else
                    {
                        li_Maintenance.Style["display"] = "none";
                        Li1.Style["display"]            = "none";
                        Li2.Style["display"]            = "none";
                    }
                    if (Int32.Parse(txt_car_Age.Text) > 6)
                    {
                        li_Maintenance.Style["display"] = "none";
                        Li1.Style["display"]            = "none";
                        Li2.Style["display"]            = "none";
                    }
                }
                else
                {
                    Page.RegisterStartupScript("onclick", "<script language='javascript'>{alert('Car Expense claim cannot be submited ..!');window.open('../../Portal/SCIL/Home.aspx','frmset_WorkArea');}</script>");
                }
            }
        }
        catch (Exception Exc) { FSL.Logging.Logger.WriteEventLog(false, Exc); }
    }
    // If action controller and player are not set, try using fallbacks
    void Setup()
    {
        if (actionController == null)
        {
            actionController = FindObjectOfType (typeof (ActionController)) as ActionController;
        }

        if (player == null)
        {
            player = FindObjectOfType (typeof (Player)) as Player;
        }
    }
 //
 void ControllEventCallback(object sender, ActionController.ControllEventArgs e)
 {
     Candy item0 = e.srcCandy;
     Candy item1 = e.destCandy;
     //
     setCandy(item0);
     setCandy(item1);
     //
     switch (e.mType)
     {
         case 0:
             {
                 isExchange = true;//设置交换状态为真
                 isReadyToCheck = true;//打开检测开关
                 //
                 this.onReadyCallback(new GameControllerEventArgs(_STATUS.BUSY, _OPERATIONS.EXCHANGE));//通知不可以交换位置
                 //
                 break;
             }
         case 1:
             {
                 //
                 addToDestroyList(item0);
                 //
                 addToDestroyList(item1);
                 //
                 Candy temp_item = (!item0.isSpecial) ? item0 : item1;
                 //
                 List<Candy> item_list = findCandysOfType(temp_item);
                 //
                 addToDestroyList(item_list);
                 //
                 StartCoroutine(this.waitAndRemoveColorful());
                 break;
             }
         case 2:
             {
                 break;
             }
         case 3:
             {
                 setCandy(item0);
                 setCandy(item1);
                 break;
             }
         default: break;
     }
 }
    //
    void Start()
    {
        //
        RecycleList = new List<Candy>();
        //
        ac = this.gameObject.GetComponent<ActionController>();
        ac.AttachEventCallback(this.ControllEventCallback);
        //
        this.AttachEventHandler(ac.isReadyCallback);
        //
        InitPool(this.mCol, this.mRow, ref this.ShowList);
        InitCandys(SVector);
        //
        MatchList = new ArrayList();
        //
        DestroyList = new List<Candy>();
        //
        while (0 < CheckMatch())
        {
            removeMatchCandy();

            DestroyCandy();

            InitCandys(SVector);
        }
    }
Exemple #43
0
    public override bool HandleHitByTarget(ActionController ac, bool isBullet)
    {
        bool    ret = false;
        Vector3 dir = ac.ThisTransform.localPosition - _owner.ACOwner.ThisTransform.localPosition;

        dir.y = 0;
        if ((ac.ACGetCurrentAttack() != null && ac.ACGetCurrentAttack()._ignoredParry))
        {
            _owner.ClearActionSwitchFlag(FC_ACTION_SWITCH_FLAG.IN_RIGIDBODY2);
        }
        else if (_owner.IsOnParry == FC_PARRY_EFFECT.PARRY ||
                 _owner.IsOnParry == FC_PARRY_EFFECT.PARRY_BULLET_FAIL ||
                 _owner.IsOnParry == FC_PARRY_EFFECT.SUCCESS)
        {
            ret = true;
        }
        else if (_currentState == AttackBase.ATTACK_STATE.STEP_1 &&
                 _canParry && _parrySuccessCost <= _owner.ACOwner.Energy &&
                 _isFirstAttack &&
                 (_canParryBullet ||
                  (!_canParryBullet && !isBullet)))
        {
            _owner.IsOnParry = FC_PARRY_EFFECT.SUCCESS;
            dir.Normalize();
            if (dir != Vector3.zero)
            {
                _owner.ACOwner.ACRotateToDirection(ref dir, false);
                _owner.ParryTarget = ac;
                _owner.SetActionSwitchFlag(FC_ACTION_SWITCH_FLAG.CANT_ROTATE);
            }
            ret = true;
        }
        else if (_currentState == AttackBase.ATTACK_STATE.STEP_2 && _parryCost <= _owner.ACOwner.Energy)
        {
            if ((isBullet && !_canParryBullet))
            {
                _owner.IsOnParry = FC_PARRY_EFFECT.PARRY_BULLET_FAIL;
            }
            else
            {
                _owner.IsOnParry = FC_PARRY_EFFECT.PARRY;
            }
            dir.Normalize();
            if (dir != Vector3.zero)
            {
                _owner.ACOwner.ACRotateToDirection(ref dir, false);
                _owner.ParryTarget = ac;
                _owner.SetActionSwitchFlag(FC_ACTION_SWITCH_FLAG.CANT_ROTATE);
            }
            _attackCanSwitch = true;
            ret = false;
        }
        else
        {
            _owner.ClearActionSwitchFlag(FC_ACTION_SWITCH_FLAG.IN_RIGIDBODY2);
            _owner.IsOnParry = FC_PARRY_EFFECT.FAIL;

            Transform trans = Utils.FindTransformByNodeName(_owner.ACOwner.ThisTransform, "node_right_weapon");
            if (trans == null)
            {
                Debug.LogError("PARRY_EFFECT_POS is null");
            }

            Vector3 pos = trans.position;
            GlobalEffectManager.Instance.PlayEffect(FC_GLOBAL_EFFECT.PARRY_FAIL, pos);
        }
        if (ret)
        {
            _attackCanSwitch = true;
        }
        return(ret);
    }